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

olx namespace #102

Closed
gkresic opened this issue Jul 19, 2017 · 2 comments
Closed

olx namespace #102

gkresic opened this issue Jul 19, 2017 · 2 comments

Comments

@gkresic
Copy link
Contributor

gkresic commented Jul 19, 2017

I'm not even sure what is the purpose of this namespace in OpenLayers, but I'm wondering if gwt-ol3 should support it?

One use case is to support ol.render.Event which references olx.FrameState. I'm planning to use it for animations like shown in this example.

@TDesjardins
Copy link
Owner

@gkresic have a look at https://github.com/openlayers/openlayers/blob/81acbc0f254fe51136c649ace357350043217383/externs/readme.md
OpenLayers uses the olx namespace to declare objects with object literals as externs. Trough that this saves them from renaming by the closure compiler.
All these classes don't have an explicit constructor. From my point of view we could wrap this in the standard namespace 'ol' in the way like the option classes are wrapped. For example:

ol.FrameState:

package ol;

@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class FrameState {

or as interface if we don't want to create own instances but why not? 😄

@gkresic
Copy link
Contributor Author

gkresic commented Sep 8, 2017

Agree.
Meanwhile, I've implemented my feature using com.google.gwt.animation.client.AnimationScheduler so I didn't need olx.FrameState, but if I encounter some other olx.* class, I'll implement it in ol namespace as you suggested.

@TDesjardins TDesjardins added this to the v4.1.0 milestone Sep 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants