-
Notifications
You must be signed in to change notification settings - Fork 70
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
Examples are broken on master #8
Comments
Further, if I try to implement the popup example myself by following the steps on the Building custom toolbars wiki page while using the master branch's You can see an example in my gist. And a demo at the bl.ocks.org demo site. (Each of the css and js files was taken from that repo's respective master branch.) I get the error This seems to be evidence that Leaflet.toolbar's master branch is broken. I've also tried doing All in all, I'm not able to get an example using Leaflet.toolbar and Leaflet.draw working at all. Something's special about that |
Hey Kyle - sorry about this. I understand that it's not intuitive behavior. The examples for Leaflet.toolbar all draw on Leaflet.draw, which is a separate Leaflet plugin. Leaflet.draw currently uses its own toolbars, not built using Leaflet.toolbar. For this reason, the Leaflet.draw dependency in the Leaflet.toolbar The examples page loads the This should be resolved once the PR is accepted and we push a new release of In the meantime, the easiest solution for you is just to build I may come back to this over the next few days and modify the files that are loaded in the example so that Again, sorry about this. |
Thanks for the quick response @manleyjster! No need to apologize. I had no idea I was attempting to use Leaflet.toolbar and Leaflet.draw together at a time of transition. Very exciting to see this change that's coming! I knew that Leaflet.draw was a different library, but I naively assumed that Leaflet.toolbar just overrode or plugged into Leaflet.draw. I'm quite new to Leaflet and its plugins, so it's been a learning experience. I appreciate the extra information. I now see the Great, I'll see what I can do with building from source. I might also focus on some other pieces of my application for now, until these Leaflet.draw and Leaflet.toolbar modifications are officially released. I've also taken some time to read up on the PR, and your blog post for the work you've done. I'm certainly excited to use this code, so I look forward to its release! |
Your instructions to build the leaflet-draw source worked to get the popup example working locally on the master branch. Thanks! |
The version of the file used in example (here) doesn't exist at all in your fork repository neither in leaflet-toolbar or leaflet-toolbar-plugin or leaflet-toolbar-plugin-patches or even external-leaflet-toolbar. None of the latest versions of those branches actually work. |
Marking as fixed because the workaround described in this bug is no longer required with the release of https://github.com/justinmanley/leaflet-draw-toolbar. |
I've cloned the Leaflet.toolbar repo, am on the master branch, and done an
npm install
like the README instructs. However, when I view the examples (popup and control) in my browser (Safari 8.0.2 on Yosemite), neither of them works.The popup example gives me this error:
TypeError: undefined is not an object (evaluating 'L.Edit.Popup.Edit')
The control example gives me errors about loading CDN'd CSS and JS files, as well as this error:
TypeError: undefined is not an object (evaluating 'new L.DrawToolbar.Control')
Now, if I check out the
gh-pages
branch, the examples do work. But to have the examples broken on the master branch ends up being confusing. And it's not evident that I need to check outgh-pages
to get working examples.Could the master branch examples be updated to work?
The text was updated successfully, but these errors were encountered: