Thursday, 9 July 2015

carto - Dynamic rendering on a layer with a long SQL query


I have a question on dynamic rendering with the CartoDB APIs. These APIs are new for me.


Data is a big layer stored in CartoDB (about 30 000 polygons).


In my application the default rendering of this layer must be replaced by a rendering defined by the user. For each subset of selected polygons per the user, the color change. But in a subset the number of polygons can be about 10 000 polygons for example.


In my code I use the subLayerOptions by setting SQL and cartocss properties. The SQL is like "sql:"SELECT * FROM polygons where ID in ('10000','40202'...".


It works fine with a few values but it doesn't work when the SQL request contains a lot value because the request is too long.



Is there an another method to do this?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...