ACS Place photo

You must Login before you can answer or comment on any questions.

Trying to display a photo or thumbnail of a place.

function searchPlaces(lat, lon) {
        Cloud.Places.search({
            latitude: lat,
            longitude: lon
        }, function (e) {
            if (e.success) {
                if (e.places.length == 0) {
                    placeListTable.setData([
                        { title: 'No places near by.'}
                    ]);
                }
                else {
                    var data = [];
 
                    for (var i = 0, l = e.places.length; i < l; i++) {
                        var place = e.places[i];
                        var row = Ti.UI.createTableViewRow({
                            height: 95
                        });
                        var test = Ti.UI.createLabel({
                            text: place.photos.urls.square_75
                        });
                        row.add(test);
                        data.push(row);
                    }
                    placeListTable.setData(data);
                }
            }
        });
    }
Tried the following code and does not work, please help.

Your Answer

Think you can help? Login to answer this question!