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

Better geodesy handling #2345

Merged
merged 16 commits into from
Jan 3, 2014
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update tests to reflect no clamping near poles
  • Loading branch information
mourner committed Jan 3, 2014
commit dab0cbfc14a486017d8a580adc26e31632a517bd
4 changes: 2 additions & 2 deletions spec/suites/geo/CRSSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ describe("CRS.EPSG3857", function () {
describe("project", function () {
it('projects geo coords into meter coords correctly', function () {
expect(crs.project(new L.LatLng(50, 30))).near(new L.Point(3339584.7238, 6446275.84102));
expect(crs.project(new L.LatLng(90, 180))).near(new L.Point(20037508.34279, 20037508.34278));
expect(crs.project(new L.LatLng(-90, -180))).near(new L.Point(-20037508.34279, -20037508.34278));
expect(crs.project(new L.LatLng(85.0511287798, 180))).near(new L.Point(20037508.34279, 20037508.34278));
expect(crs.project(new L.LatLng(-85.0511287798, -180))).near(new L.Point(-20037508.34279, -20037508.34278));
});
});

Expand Down
8 changes: 4 additions & 4 deletions spec/suites/geo/ProjectionSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ describe("Projection.Mercator", function () {
});

it("projects the northeast corner of the world", function () {
expect(p.project(new L.LatLng(90, 180))).near(new L.Point(20037508, 20037508));
expect(p.project(new L.LatLng(85.0840591556, 180))).near(new L.Point(20037508, 20037508));
});

it("projects the southwest corner of the world", function () {
expect(p.project(new L.LatLng(-90, -180))).near(new L.Point(-20037508, -20037508));
expect(p.project(new L.LatLng(-85.0840591556, -180))).near(new L.Point(-20037508, -20037508));
});

it("projects other points", function () {
Expand Down Expand Up @@ -56,11 +56,11 @@ describe("Projection.SphericalMercator", function () {
});

it("projects the northeast corner of the world", function () {
expect(p.project(new L.LatLng(90, 180))).near(new L.Point(20037508, 20037508));
expect(p.project(new L.LatLng(85.0511287798, 180))).near(new L.Point(20037508, 20037508));
});

it("projects the southwest corner of the world", function () {
expect(p.project(new L.LatLng(-90, -180))).near(new L.Point(-20037508, -20037508));
expect(p.project(new L.LatLng(-85.0511287798, -180))).near(new L.Point(-20037508, -20037508));
});

it("projects other points", function () {
Expand Down
4 changes: 2 additions & 2 deletions spec/suites/layer/vector/CircleSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ describe('Circle', function () {
it('returns bounds', function () {
var bounds = circle.getBounds();

expect(bounds.getSouthWest()).nearLatLng(new L.LatLng(49.95122, 29.88281));
expect(bounds.getNorthEast()).nearLatLng(new L.LatLng(50.06419, 30.05859));
expect(bounds.getSouthWest()).nearLatLng(new L.LatLng(49.94347, 29.91211));
expect(bounds.getNorthEast()).nearLatLng(new L.LatLng(50.05646, 30.08789));
});
});
});