Aggregating points: JSON on SQL and loops on infowindows
by Jorge Sanz on
NOTE: I’ll use CARTO but you can apply all this to any webmapping technology backed by a modern database. Get all the data So we start with the typical use case where we have a one to many relationship like this: select e.cartodb_id, e.displayname, e.division, e.photourl, l.cartodb_id as locaction_id, l.location, l.the_geom_webmercator from locations l inner join employees e on e.location = l.location order by location Easy peasy, we have a map with many stacked points.