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

List of outstanding features #44

Open
PaulTodd opened this issue Jul 15, 2020 · 2 comments
Open

List of outstanding features #44

PaulTodd opened this issue Jul 15, 2020 · 2 comments

Comments

@PaulTodd
Copy link

I couldn't find a list of the outstanding features/API that needs to be worked on to fully wrap leaflet. I'd like to help, but I really don't know where to start. Could you provide an example of what is involved with wrapping one of the APIs? Or are there any good references to use to learn how to wrap js APIs?

Thanks

@chucker
Copy link
Contributor

chucker commented Jul 15, 2020

[ Disclaimer: I'm not the maintainer. ]

I couldn't find a list of the outstanding features/API that needs to be worked on to fully wrap leaflet.

Leaflet is fairly large (not to mention there's quite a few plug-ins), so I'm not sure "fully" is a realistic goal.

I'd like to help, but I really don't know where to start. Could you provide an example of what is involved with wrapping one of the APIs? Or are there any good references to use to learn how to wrap js APIs?

You can look at some of the existing pull requests.

Most wrappers look roughly like this:

  • there's added methods and/or properties on the model classes (e.g. Map.cs, or Models/Layer.cs)
  • those then call into LeafletInterops.cs, which serves as the interop 'hub' from the C# side
  • that in turn calls into wwwroot/leafletBlazorInterops.js, which talks directly to Leaflet

For the general concepts, limitations, etc. of JS interop in Blazor, you can learn from sites such as:

@PaulTodd
Copy link
Author

That's true! I doubt Leaflet will ever be fully wrapped, but I'd like to see how far we can go. :) Those look like great resources. Thank you for describing the general process the wrapper goes through. I'll start researching that and see if there's anything valuable I can contribute to this project.

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