For any Cartodb NamedMap, we load it using this function:
cartodb.createLayer(map, namedLayerSource, {https: true})
.addTo(map)
.done(function (layer) {
});
After that I need to access all features data inside that named map. So It is known that we can do this:
sublayer.on('featureClick', function (e, pos, latlng, data) {
console.log(data);
}
);
But what can i do to get data for all features without "featureClick" event ? Is there anyway I can get all data of that NamedMap in an Array or a Map?
I am using Cartodb.js v3.15 And I want to enable a search feature in which the user can search for any details inside the data for all points/features exists in a carto NameMap.