-
Notifications
You must be signed in to change notification settings - Fork 817
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
Openlayers v3 #23
Comments
NOTE: It's possible that their ol-debug.js file might be better left out |
It looks like you can generate a suitable externs file using a script in the ol3 source zip.
|
Thanks for looking into this. :)
Is the OpenLayers lib written in Google Closure? If so I've previously seen
I think if we can get the externs directly from the publisher of the lib we should do that. Feel free to open a PR with this any time. |
Thanks, great to hear back from you. Regarding ol-debug.js, yes, looks like their google closure code. I'll ignore. I might need a few clues on how to build Other than that I imagine it'll fall into place. My other stumbling block was clojurescript version related but I'll setup a fresh start for the PR. |
@olivergeorge you can take a look at how
If I understood you correctly we can also download the extern file from one of the archives you mentioned, right? If that's the case I'd prefer to use the file that is provided by the library authors. PS. referring to this:
|
Sorry, that was ambiguous wasn't it. The source repo doesn't have an extern file to copy but it does have a node task which can generate one. (Wish I knew that a few days ago!) Two, actually three, options as best as I can see it:
|
On that third point, I figured I'd log an issue in case it's a quick fix. |
I like 1+3 the most because it keeps the packaging simple and consistent with other packages. |
Alright, closed mine again. haha. |
hah, cool. I'll pull together a PR. |
Maybe add a comment with a note about generating externs + a link to the OpenLayers ticket to the build.boot file |
Wow that went cleanly. Hope it looks okay... |
Awesome I'll stick a few simple examples in a repo while I'm playing around. Few First example just uses the raw JS from their getting started... https://github.com/condense/example_openlayers_cljsjs/blob/master/hellool/src/hellool/examples.js On 5 February 2015 at 04:17, Martin Klepsch notifications@github.com
|
Great stuff! @olivergeorge do you have a CLJS example? |
I think I can work that out. brb... On 5 February 2015 at 10:21, Julien Eluard notifications@github.com wrote:
|
If we can add it as a closure library that would be fantastic! On Thursday, February 5, 2015, Oliver George notifications@github.com
— |
Does that change something besides having to rely on |
I'm not sure if this is how it currently works but I guess having a :libs On Thursday, February 5, 2015, Julien Eluard notifications@github.com
— |
This is an experiment in compiling openlayers v3 into your app directly. There are file size benefits to this. Based on the getting started example provided by OL3 the filesize is improved from 539K to 247K when we switch out the cljsjs/openlayers library and compile openlayers ourselves. https://github.com/condense/example_openlayers_cljsjs/tree/master/compiledin Openlayers is built on Google Closure but doesn't follow the source file conventions required for compilation with cljs. Turns out it's two problems: file names don't match package provided, and files providing multiple namespaces. Through sheer bloody mindedness I proved it can work. I scripted a "move file to location of goog.provides script" and manually teased apart the multi provide files. Hours later, it worked! Problem is that this new codebase is hard to keep up to date because of the file splitting. End result, I pinged the OL3 dev list to share my experiences and ask about willingness to receive patches. Not sure it's a priority for them. https://groups.google.com/forum/#!topic/ol3-dev/TyhQqM-GlBM Please treat all of this with suspicion. Others with more experience of compiling using Google Closure and the clojurescript compiler can talk with much more authority. |
Great job! 👍 Another way to use OL3 in closure mode would be to modify the ClojureScript compiler so that it discover closure modules even when they don't follow folder convention. Not sure if that's feasible. |
Yeah, it's clear that the compiler can operate in that manner else OL3 I presume it's just that the java style approach (file matches package) is On 5 February 2015 at 11:32, Julien Eluard notifications@github.com wrote:
|
My opinion as a non-contributor is that there is more value to have OL3 as a regular JS dependency than nothing. Maybe we can keep adding relevant updates to this issue to keep a trace? |
Sounds like a plan. I imagine Martin has thoughts on the matter. On 5 February 2015 at 12:06, Julien Eluard notifications@github.com wrote:
|
Got some feedback from @elemoine from OL3. Sounds like they are happy to include the extern in releases which is great. openlayers/openlayers#3202 (comment) My long shot asking about coding conventions / refactoring to meet our stricter code layout requirements seems to be a dead end. https://groups.google.com/forum/#!searchin/ol3-dev/oliver/ol3-dev/TyhQqM-GlBM/oPOxVFIb3egJ |
Very much agree about everything that has been said here:
I've opened another issue to discuss this: #28. I'll poke around how/if this can be done. Let's continue the discussion in the new issue so this doesn't get lost in a closed one. |
Hello
I think this is vaguely what's needed for openlayers v3.
Key points
The externs might benefit from pruning, they include bootstrap, jquery, clojure-compiler...This doesn't build for me. Hoping you might get it going and include or perhaps just give me some pointers.Update: A few tweaks (incorporated below) and now it builds. No guarantees beyond that just yet.
The text was updated successfully, but these errors were encountered: