This example uses the libraries CartoDB.js and d3.js to display two maps that are connected. If you click on the CartoDB map, the d3.js map changed its center.
First a "normal" CartoDB map is created with the cartodb.createLayer() method, but everytime that the map is clicked, the longitude and latitude values are stored in the lat and lon variables. On the other hand, a d3.js map is created by using the d3.geo.orthographic() projection to get the effect of a 3D map of the world.
Everytime that the CartoDB map is clicked, the latitude and longitude coordinates that are get from the "clicked" event are used to change the center of the d3.js map.
forked from oriolbx's block: CartoDB.js map and interactive d3.js earth globe
Modified http://d3js.org/d3.v3.min.js to a secure url
Modified http://d3js.org/d3.geo.projection.v0.min.js to a secure url
Modified http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js to a secure url
https://d3js.org/d3.v3.min.js
https://d3js.org/d3.geo.projection.v0.min.js
https://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js