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

Support wrapX for attributions #3377

Merged
merged 1 commit into from
Mar 23, 2015

Conversation

ahocevar
Copy link
Member

The intersection tests for attributions currently fail when testing against tile ranges from an extent of a view that wraps the x-axis. This is fixed by letting attributions know about the world extent.

Fixes #999.

@ahocevar ahocevar force-pushed the attribution-wrapx branch from 63a5ada to 585deef Compare March 21, 2015 19:33
* @param {Object.<string, ol.TileRange>} tileRanges Tile ranges.
* @param {ol.tilegrid.TileGrid=} opt_tileGrid Tile grid.
* @param {ol.proj.Projection=} opt_projection Projection.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for making tileGrid and projection optional arguments? As far as I can tell, intersectsAnyTileRange is always passed a tile grid and a projection.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could even use {!ol.tilegrid.TileGrid} and {!ol.proj.Projection} and avoid testing whether tileGrid and projection are null in the code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I can change that. Good point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type check has to happen somewhere. I pushed another commit that implements your suggested changes. Let me know which one you like better.

@elemoine
Copy link
Member

What do you think about https://github.com/elemoine/ol3/commit/6080f864bfc3f6c0bb6faf784975491dd5bc6de8?

If you agree with my commit could you please merge the three commits into one before merging?

@ahocevar ahocevar force-pushed the attribution-wrapx branch from 391d1df to 055f0fe Compare March 23, 2015 15:46
@elemoine
Copy link
Member

Please merge when the build passes on Travis. Thanks!

@ahocevar ahocevar force-pushed the attribution-wrapx branch from 055f0fe to d9c04cd Compare March 23, 2015 15:55
ahocevar added a commit that referenced this pull request Mar 23, 2015
@ahocevar ahocevar merged commit 45e9695 into openlayers:master Mar 23, 2015
@ahocevar ahocevar deleted the attribution-wrapx branch March 23, 2015 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attributions are not calculated correctly over date line wraps
2 participants