-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Allow '{-y}' placeholder #1983
Allow '{-y}' placeholder #1983
Conversation
The coordinate computation is done in a function for performance reason: the value is only computed if the url contains |
Why pow()? Shift operation should be MUCH faster. |
Looks like it’s only true on mobile: http://jsperf.com/math-pow-vs-bit-shift |
Math.pow replaced by shift because it's usually faster (and saves 8 characters ...) |
Looks good now. |
Post merge review: It looks to me like this At a minimum, documentation should be added here. It should clearly explain when to use a different template syntax and when to use a different source type. |
Yahoo actually is not really relevant anymore. They switch to the standard {y} with newer services - no need to care about that anymore. {-y} is not really a different source type, but simply counting starts at the south pole instead on the north pole. Everything is the same - It does not really verify a new source type for that. I though source.XYZ is TMS now for OL3, otherwise I wonder why there is no TMS at all anymore, because all these example using XYZ actually are accessing TMS services. |
@ahocevar you're right; the
And in this context ( |
No. That's wrong! TMS Does not mean OSGeo-Format! There are TMS using counting starting on north pole (i.e. Google style) and some others start counting on south pole (OSGeo style). What you propose is to have the more uncommon format named as TMS. That's simply wrong. If you rename it TMS, then you still need to support {y} and {-y}. This is not a new service type, but actually a new tile coordinate system. As such thing as a tile coordinate system is not supported ATM and inventing one would be overkill I propose to use the current solution, which is easy and pretty straightforward (and I'm aware, that it is not 100% clean design, but who needs that). |
@stoecker In OpenLayers 2, TMS is what you refer to as 'OSGeo style', and XYZ is what you refer to as 'Google style'. And it is not north vs. south pole, it is top-left vs. bottom-left corner. Since our 'XYZ' source uses a coordinate system with x (tile index from left), y (tile index from top) and z (zoom level), I think it is fair to say that TMS is just a flavor of XYZ, with the difference that y is the tile index from the bottom. Personally I find the |
No description provided.