-
Notifications
You must be signed in to change notification settings - Fork 772
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
move Layer.OSM in its own file #144
Conversation
Conflicts: apidoc_config/Menu.txt
Looks good to me. |
* - <OpenLayers.Layer.XYZ> | ||
*/ | ||
OpenLayers.Layer.OSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { | ||
name: "OpenStreetMap", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need some documentation here and for the other properties? Except for this I think the change is perfectly fine for master.
Much though I dislike excessive requires, isn't this a case where SphericalMercator should be required? AFAIA, all the OSM renderings use it, so it seems unnecessary to ask people to specifically add it to their builds. |
I agree there should be a |
Good catch. I'll add it. |
another point is that they plan to change the licence, which according to http://www.osmfoundation.org/wiki/License/We_Are_Changing_The_License should be complete by April 1. So the attribution should change at that time, presumably before the next OL release. |
Thanks @probins. I think we should track this in a separate issue (or pull request). I'll open an issue if you can't get to it before I do. |
see #149 |
@tschaub, @probins, going back to |
@marcjansen a9d919a adds documentations for |
@elemoine the function at the end of SphericalMercator uses it, surely, by adding the transforms to Projection, so without the SphericalMercator file you won't be able to add/transform vectors in another projection (unless you have Proj4JS present, of course). I have to admit I've always found this rather confusing, as SphericalMercator is not really a Layer, it's just an object defining functions. Perhaps it would be better to rename it? As for the requires, SphericalMercator is simply a convenience so you can use one of the common raster layers without having to load Proj. On the other hand, if you have Proj anyway, then you don't need it, so perhaps it would be better to make it optional for all those layers. and not required? |
as a further comment, Google is currently the only layer that actually mixes the SM functions into the layer |
@probins, for you to know in case you haven't noticed: The code in Layer/OSM.js does not at all rely on code in Layer/SphericalMercator.js, so it really strikes meas odd to have Layer/OSM.js require Layer/SphericalMercator.js. My comment also applies to Layer/Bing.js. (Layer/Bing.js does include a I understand that without And for that I think I'd suggest moving the mercator/wgs84 transformation-related code from SphericalMercator.js to Projection.js. SphericalMercator.js would just include the mixin for |
yes, I would agree with that. Logically, the transform logic belongs in with Projection, not as a pseudo-layer. Perhaps you could have it as a sub-class of Projection? This also raises the question of whether Google actually needs the mixin and its own special logic. Can it not use the transforms the same as any other projected layer? I also agree that Bing and OSM should be the same: either require SphericalMercator or not. |
@probins, I was thinking of moving Regarding the mixin: |
e160628 adds the Please tell me if I can merge this. |
Please merge. See #153 for changes that pull transforms out of SphericalMercator.js. |
Conflicts: notes/2.12.md
move Layer.OSM in its own file
Related to issue #138.