A complete, automatic and flexible orthographic localisator for Wikipedia maps.
var bb = { "item":"India", "W": 67.0, "N":37.5, "E": 99.0, "S": 5.0 },
localisator("body", 200, bb.item, bb.W, bb.N, bb.E, bb.S);
It take as input :
"body"
, "#hook"
, to be appended to,The style approximate most recent Wikipedia localisator map guidelines.
The first issue was to move away from straight lines to correctly curved lines.
The second issue was to support bounding boxes upon the 180⁰ meridians. Boxes upon the 180th meridian need special management. By example, localising a set of pacific islands between 155⁰ East and -155 West initially gives....
...with correct rotation (+180⁰) :
... and with correct boxing:
Localisator now perfect, enjoy !
![enter image description here][7] [7]: http://i.stack.imgur.com/Vc0qK.png
For technical details, see code and D3.geo : Spherical arcs rather than straight lines for paralles?. For deeper documentation, see D3.geo and bounding boxes.
https://code.jquery.com/jquery-2.1.0.min.js
https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.min.js
https://cdnjs.cloudflare.com/ajax/libs/topojson/1.1.0/topojson.min.js
https://cdnjs.cloudflare.com/ajax/libs/d3-geo-projection/0.2.9/d3.geo.projection.min.js