Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Pull request Compare This branch is even with afar:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
readme
robinson.js

readme

All code is licensed under the GPLv2. 

Javascript library for projecting lng/lat coordinates to x,y coordinates using the Robinson projection. See it in use on our Spin the Globe feature on the http://afar.com home page.

Ported to Javascript by AFAR Media from ActionScript code written by Chris Youderian (http://www.flashmap.org/robinson-projection-in-as3-gpl/).

---

Usage:

myProjection = new Robinson(map_width, map_height);
myProjection.project(lat, lng); // -> returns point object in the form {x:10, y:20}

You can also use the projectToCSS() method in the same way to get a point which matches the CSS coordinate system.
Something went wrong with that request. Please try again.