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

Avalonia for Mac Support #163

Open
brentmetro opened this issue Jul 29, 2022 · 0 comments
Open

Avalonia for Mac Support #163

brentmetro opened this issue Jul 29, 2022 · 0 comments

Comments

@brentmetro
Copy link

I have begun work on a fork to add support for Avalonia on Mac, I believe the changes should also work for Linux as well if applied. You can view my fork at brentmetro/GMap.NET, check out the avalonia-mac branch. There was a Demo.AvaloniaMac project created, and GMap.NET.AvaloniaMac project. Neither of these were added to the main sln file. I simply ran these via command line with dotnet build/run from their directories.

Target framework is set to net6.0 as that is all I have available to test with currently. Avalonia version was bumped up to the latest 0.10.17.

Some of the Core Internals had to change, so I created a new OSX constant in the Core project file. Most issues were resolved by changing the conditional directives in the project to (!MONO && !OSX) in FastReaderWriterLock.cs and FastResourceLock.cs.

A couple issues remain, as I'm not a deep dotnet developer and unsure the best fix going forwards. SetCursorPos is set to always return true on OSX, Line 26. Then in Cache.cs the ImageCache is not set when initialized or else the tiles threw exceptions, Line 153.

I did add an option to set the ShowCenter property, commit dfe1908. Also there was a zooming bug using the mouse wheel when changing directions that looked to be from passing in the old value twice instead of the new zoom value, commit 076d45e.

Open to any suggestions or comments.

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