Table join not displaying in createLayer function in cartodb.js

المشرف العام

Administrator
طاقم الإدارة
I am trying to build on the cartodb tutorial to develop a map of fibre networks in Africa. The example works fine when my SQL select is very simple i.e.

var layerSource = { user_name: 'afterfibre', type: 'cartodb', sublayers: [{ sql: "SELECT * FROM af_fibrephase", cartocss: $("#category").text() }] } But when I attempt a more sophisticated query with a table join, such as below, the layer no longer renders.

var layerSource = { user_name: 'afterfibre', type: 'cartodb', sublayers: [{ sql: "SELECT af_fibrephase.the_geom, af_fibrephase.live, af_organisation.name FROM af_fibrephase, af_organisation WHERE af_fibrephase.operator_id = af_organisation.organisation_id", cartocss: $("#category").text() }] } The SQL query tests ok via the API https://afterfibre.cartodb.com/api/...operator_id = af_organisation.organisation_id

I sense I am doing something obvious wrong but can't work out what.

Thanks... Steve



أكثر...
 
أعلى