MercatorProjection defines the spherical Mercator projection. Google Maps uses this projection together with WGS84 coordinates, in which case it is known as the "Web Mercator" projection (see Wikipedia). This class makes no assumptions regarding the coordinate system of its input points, but simply
| 159 | // a Mercator edge where one endpoint is a pole. If you need to do this, clip |
| 160 | // the edge first so that the "y" coordinate is no more than about 5 * maxX.) |
| 161 | type MercatorProjection struct { |
| 162 | xWrap float64 |
| 163 | toRadians float64 // Multiplier to convert coordinates to radians. |
| 164 | fromRadians float64 // Multiplier to convert coordinates from radians. |
| 165 | } |
| 166 | |
| 167 | // NewMercatorProjection constructs a Mercator projection with the given maximum |
| 168 | // longitude axis value corresponding to a range of [-maxLng, maxLng]. |
nothing calls this directly
no outgoing calls
no test coverage detected