-
Notifications
You must be signed in to change notification settings - Fork 87
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
Compatibility with Fastboot #74
Comments
Yes, we need to add guards to make sure we don't use leaflet on node. |
💯 👍 This enhancement is of top priority |
I just did a quick pass at fastboot-ifying the addon, and I have it working for a very simple demo case, but applied the pattern across the whole addon, so - in theory it should work. To be clear - what I've done is simply changed the addon so it's basically ignored by fastboot / node. To be very very clear - it will not render a map on the server and send that down to a client. This simply allows an app that is using this addon, to run using Fastboot, without errors. I'll push to my fork tomorrow (after messing w/ it more) but if there are others who want to use this w/ FastBoot, please let me know here and participate in reviewing/testing the eventual PR. What I'd like to add is a placeholder/loader so the DOM renders quickly, and the fact that there is a map "coming soon" is obvious to the viewer. |
@dbouwman Would love a PR. :) I've also assumed that a first take would be to ignore any rendering on the server. I don't how feasible it would be to "hydrate" the map afterwards on the client. Sounds complex. |
Actually, that package provides an image. Ideal for that placeholder you mentioned. |
@miguelcobain exactly - although from my quick look at that repo, it sounds like the performance (~4s to render) is not quite inline with the intent of fastboot, so I'm not sure we'd want to bundle that into this addon. I'm still scheming on this, but perhaps another project that uses headless-leaflet, that can create those images and cache them, then in this project allow for a At least for the use-cases I'm looking at, that would be preferable. PR for fastboot coming soon :) |
X-Ref: #104 |
I've posted a new PR at #110 that solves this problem. |
ember-leaflet is fastboot 1.0 compatible now |
Adding
ember-leaflet
to a Fastboot project is currently not possible.I have made a small app (based on the fastboot quick start tutorial) which reproduces the problem.
A related issue was opened on
ember-fastboot
here: ember-fastboot/ember-cli-fastboot#74.The text was updated successfully, but these errors were encountered: