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

Unexpected logging information appearing on map #2812

Closed
smathersgit opened this issue Nov 26, 2024 · 4 comments
Closed

Unexpected logging information appearing on map #2812

smathersgit opened this issue Nov 26, 2024 · 4 comments

Comments

@smathersgit
Copy link

Mapsui Version
5.0.0-beta 5

Mapsui Platform
MAUI DotNet9

Device
Android Emulator & Samsung S7

Describe the bug
When moving the map on the emulator or phone screen, debug messaging starts appearing on the map.

'
Information Widget PointerPressed: Map Tapped Widget
Information Widget PointerReleased: Map Tapped Widget
...
'
To Reproduce
Create a MapView and attempt to move map around (click+drag on emulator, touch+move on device)

Expected behavior
I didn't see this behaviour previously with 5.0.0-beta 3 or 4.1.7,

Additional context
Only appears when the debugger is attached (emulator or phone) . i.e. I have been unable to reproduce when launching the debug app directly on the phone.

@smathersgit
Copy link
Author

Issue also observed in 5.0.0-beta 6.

@pauldendulk
Copy link
Member

This is intended behavior. You can turn logging of by setting this static field:

LoggingWidget.ShowLoggingInMap = ShowLoggingInMap.Never;

Some things to improve:

  • Add some documentation about this in the Logging page: https://mapsui.com/v5/logging/
  • Change the logging enum from: WhenLoggingWidgetIsEnabled, WhenLoggingWidgetIsEnabledAndDebuggerIsAttached, Never to Enabled, InDebugMode, Disabled.
  • Add a logging line as soon as the app starts which shows the Mapsui version and perhaps mentions that this line is part of 'Logging in Map' and you could read more about it in the documentation.
  • Perhaps we also need some more fine grained configuration, because some types of logging can be too verbose. Or add a way to log a line only once and add a counter behind the line. Chrome has this for console logging.

@smathersgit
Copy link
Author

Confirmed that the map logging is turned off using the method provided.

@pauldendulk
Copy link
Member

Made some improvements here: #2830

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

2 participants