Permalink
Browse files

using derivation for transform instead of hard-coding magic numbers

git-svn-id: https://modestmaps.googlecode.com/svn/trunk/js@921 a23cadb0-8de1-11de-82e5-a1837a67dc72
  • Loading branch information...
1 parent 8ea20ed commit cd78b0c49bdd12819b710259a39846c244a17ee6 tom.carden committed Jun 21, 2010
Showing with 10 additions and 10 deletions.
  1. +3 −0 CHANGELOG
  2. +5 −8 modestmaps.js
  3. +2 −2 modestmaps.min.js
View
@@ -8,6 +8,9 @@ Following the semantic versioning recommendation best we can:
minor version, and backwards incompatible API changes increment
the major version." -- http://semver.org/
+v0.13.2
+ - removing magic numbers from Mercator projection for parity with Python version
+
v0.13.1
- rejiggered the Map's draw function to be a bit clearer
- removed superfluous layer.coordinate (internal only)
View
@@ -1,5 +1,5 @@
/*!
- * Modest Maps JS v0.13.1
+ * Modest Maps JS v0.13.2
* http://modestmaps.com/
*
* Copyright (c) 2010 Stamen Design, All Rights Reserved.
@@ -449,13 +449,10 @@ if (!com) {
MM.MapProvider.prototype = {
// defaults to Google-y Mercator style maps
- // (for how to generate these magic numbers
- // see http://modestmaps.com/calculator.html)
- projection: new MM.MercatorProjection(
- 26,
- new MM.Transformation(1.068070779e7, 0, 3.355443185e7,
- 0, -1.068070890e7, 3.355443057e7)
- ),
+ projection: new MM.MercatorProjection( 0,
+ MM.deriveTransformation(-Math.PI, Math.PI, 0, 0,
+ Math.PI, Math.PI, 1, 0,
+ -Math.PI, -Math.PI, 0, 1) ),
tileWidth: 256,
tileHeight: 256,
Oops, something went wrong.

0 comments on commit cd78b0c

Please sign in to comment.