-
Notifications
You must be signed in to change notification settings - Fork 52
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
.NET Standard support #2
Comments
The library uses file io, which is desktop dependent. |
I don't think there's any specific core code that is desktop dependent. The file i/o methods are mostly just helper functions (except for loading mbtiles from file, using sqlite). I took the desktop approach because at the time of development, I didn't have the .net standard/core framework 😆 |
I looked into this but need to do some cleanup first to know what is actually needed. I created a PR to remove the binaries. I also see alot of unused references. |
Hi guys. I've made a Mapbox GL JS port for .Net. Check out my newest project: I wanted to create a pure C# vector map, but it was too complicated and I was juggling a few projects already. So I ended up porting Mapbox GL JS using CefSharp and it works awesome! |
Interesting. I've been working on something similar for Azure Maps. The one issue I have with cefsharp is that the winform version works great but you can't display xml elements above it which many will want to do in WPF for things like pop-ups. The WPF version of cefsharp isn't as performant and doesn(t support touch well, but xaml can be overlaid above it. What I'm considering doing is exposing an option where the user chooses if they want to allow xaml to be overlaid and then switch between the different cefsharp versions. Not sure how well the two versions run side by side but will find out soon. |
I faced the same issue while developing this library. I initially used Microsoft Toolkit, which is basically a WebView that is based on Edge engine. Halfway through I realized that they have a ton of security restrictions and won't allow their webview to communicate with localhost :/ It was pretty performant though. We can allow the user to chose whether they want to use an overlaid version (WinForms in WinFormsHost) or pure WPF, but that would require a MapboxNet WPF version is a bit faster than just running mapbox in CefSharp in WPF. The parameters have been tuned. |
I looked at the Microsoft toolkit as well but thought the xaml islands would limit the library to windows 10. Looked at the tuning you did for cefsharp and I've been doing the same. Haven't had any customers mention any issues with system.windows in the past, but could create two seperate libraries with shared code fairly easily so that the choice is made at the package level.
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Ali Ashraf <[email protected]>
Sent: Friday, April 26, 2019 7:46:27 PM
To: AliFlux/VectorTileRenderer
Cc: Ricky Brundritt; Comment
Subject: Re: [AliFlux/VectorTileRenderer] .NET Standard support (#2)
I faced the same issue while developing this library. I initially used Microsoft Toolkit, which is basically a WebView that is based on Edge engine. Halfway through I realized that they have a ton of security restrictions and won't allow their webview to communicate with localhost :/ It was pretty performant though.
We can allow the user to chose whether they want to use an overlaid version (WinForms in WinFormsHost) or pure WPF, but that would require a System.Windows.Forms reference, and it's kinda deal breaker for some people.
MapboxNet WPF version is a bit faster than just running mapbox in CefSharp in WPF. The parameters have been tuned.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAliFlux%2FVectorTileRenderer%2Fissues%2F2%23issuecomment-487248410&data=02%7C01%7C%7C719d62594ebe48dabf8a08d6caba8bfe%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636919299888791117&sdata=3L5rE3vizxutHx40ckfBaHCY4X%2BuFHiIM1OgYO62N3I%3D&reserved=0>, or mute the thread<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABRJCRHDOYNUBOEFANJWMFTPSO5AHANCNFSM4E3DYWJA&data=02%7C01%7C%7C719d62594ebe48dabf8a08d6caba8bfe%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636919299888801128&sdata=5WpkzYDzg9iwt%2BXupVBeQBvG7gJY1vylSRH5gzkMZQA%3D&reserved=0>.
|
Some devs don't like references to I'm thinking about making a third project as well. A WPF version that uses WinFormsHost for CefSharp control. That way we'll have more control over the binding, since the MapboxNet WinForms version doesn't have dependency properties. There will be an issue of overlay but I guess it can be solved using |
The use of WPF (System.Windows.Media.BitmapSource) does make it Windows-dependant, and therefore non-NetStandard. |
@ststeiger you have done some nice upgrades. Can you send a merge request so that i can test and upgrade this repo |
I have a version that is completely not dependent on any Windows specific frameworks. Basically, it uses pure SkiaSharp. I don't know how ready it is for merging, but I made it mainly for my own usage. The main things I had to do:
I also made all the nonstandard method naming to be in line with standards (so no Camel case, all is now Pascal case.) The main library now only depends on SkiaSharp for all drawing. Next plan:
Feel free to take a look. I intend to keep my fork up to date with your changes as far as I can. I will also offer you back any changes I make. https://github.com/memsom/VectorTileRenderer Edit: the biggest changes are in the XamarinForms branch. I think Master is still using 4.6.2 |
Thanks for you library!
I like how this can be used in other mapping library. I was thinking to add it as a TileSource in BruTile. If it support .NET Standard it could be used on all the platforms BruTile supports. Looking at the code I would say there is not that much standing in the way. There is a WritableBitmap that could be replaced by other methods to render to bitmap. What is the reason it does not support PCL or .NET Standard right now? Any specific limitations you ran into or did you just not attempt to?
The text was updated successfully, but these errors were encountered: