Displaying coordinates in D3 from JSON array
<p>I am getting a json response coordinates from php as follows</p>

<pre><code>{"All":[{"longitude":"36.8948669","name":" Manyanja Rd, Nairobi, Kenya","latitude":"-1.2890965","userID":"1"}, ...]}
</code></pre>

<p>I am thereafter loading it via javascript as follows:</p>

<pre><code>$.ajax({
url : "http://xxx.xxx.xxx/GetLocations.php",
dataType : "json",
data :"",

success : 
function (data){
//populate map is the function that I pass the coordinates to d3 to be shown 
 //when i console.log(data), its showing me the json so I am sure the data is there

populate_map(data)
}
});
</code></pre>

<p>And this is the function populate_map.</p>

<pre><code>function populate_map(pos_data){
    console.log(pos_data.All[0]);
    var width = 700;
var height = 580;

var svg = d3.select( "body" )
    .append( "svg" )
    .attr( "width", width )
    .attr( "height", height );

var g = svg.append( "g" );

var albersProjection = d3.geo.albers()
    .scale( 190000 )
    .rotate( [71.057,0] )
    .center( [0, 42.313] )
    .translate( [width/2,height/2] );

var geoPath = d3.geo.path()
    .projection( albersProjection );




var projection = d3.geo.mercator()
.center([36.8, -1.3])
.scale([60000])
.translate([width/2, height/2]);

var nairobipathing = d3.geo.path().projection(projection);

g.selectAll( "path" )
    .data( data.geometries )
    .enter()
    .append( "path" )
    .attr( "fill", "#ccc" )
    .attr( "stroke", "#333")
    .attr( "d", nairobipathing );



      svg.selectAll("circles.points")
        .data(pos_data)
        .enter()
        .append("circle")
        .attr("r",5)
        .attr("transform", function(d) {return "translate("  d.All.longitude+","+d.All.latitude ")";});
}
</code></pre>

<p>The problem is that its not showing any coordinates on the nairobi map that i have initialised but when I console.log the data in the populate function its showing me data json. </p>

<p>The last svg is the one i am using to populate the map with these coordinates but it doesnt work in any way and doesnt show any coordinate in the map.</p>

<p>Kindly help me to show me where the problem is</p>