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

No need to go 10 times around the globe #1398

Merged
merged 1 commit into from
Oct 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/graticule.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
maxExtent: [-2200000,-712631,3072800,3840000],
worldExtent: [-180, 0, 180, 90]
}
// Allow date line wrapping for 10 worlds by using -1800 and 1800
// instead of -180 and 180.
OpenLayers.Projection.defaults["EPSG:4326"].worldExtent = [-1800, -90, 1800, 90];
// Enable date line wrapping by using -360 and 360 instead of -180
// and 180.
OpenLayers.Projection.defaults["EPSG:4326"].worldExtent = [-360, -90, 360, 90];
var graticuleCtl1, graticuleCtl2;
var map1, map2;
function init(){
Expand Down
2 changes: 1 addition & 1 deletion notes/2.14.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ a `worldExtent` option. This is the extent of the world in geographic coordinate
* The control's layer (`gratLayer`) now prefers the Canvas renderer. This avoids coordinate range issues with the SVG renderer.
* Previously, meridians were only labelled at the bottom, and parallels at the right border of the map. To better support polar projections, meridians are now also labelled at the left border, and parallels at the top border, if they do not have an intersection point with the bottom or right border.
* To avoid maps with missing or short grid lines, make sure you do not use a graticule when working with a projection outside of its validity extent or recommended viewing area.
* To support date line wrapping, make sure you adjust the `worldExtent` setting for your projection in OpenLayers.Projection.defaults. To wrap the date line 10 times, set it to `[-1800, -90, 1800, 90]`.
* To support date line wrapping, make sure you adjust the min and max longitude in the `worldExtent` setting for your projection in OpenLayers.Projection.defaults. For EPSG:4326, set it to `[-360, -90, 360, 90]`. By using -360 and 360 instead of -180 and 180, the longitudinal grid lines will always connect at the date line.