{"action":"created","issue":{"url":"https://api.github.com/repos/CartoDB/tangram-carto/issues/55","repository_url":"https://api.github.com/repos/CartoDB/tangram-carto","labels_url":"https://api.github.com/repos/CartoDB/tangram-carto/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/tangram-carto/issues/55/comments","events_url":"https://api.github.com/repos/CartoDB/tangram-carto/issues/55/events","html_url":"https://github.com/CartoDB/tangram-carto/issues/55","id":249318370,"number":55,"title":"Map not displayed","user":{"login":"IagoLast","id":2657897,"avatar_url":"https://avatars0.githubusercontent.com/u/2657897?v=4","gravatar_id":"","url":"https://api.github.com/users/IagoLast","html_url":"https://github.com/IagoLast","followers_url":"https://api.github.com/users/IagoLast/followers","following_url":"https://api.github.com/users/IagoLast/following{/other_user}","gists_url":"https://api.github.com/users/IagoLast/gists{/gist_id}","starred_url":"https://api.github.com/users/IagoLast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IagoLast/subscriptions","organizations_url":"https://api.github.com/users/IagoLast/orgs","repos_url":"https://api.github.com/users/IagoLast/repos","events_url":"https://api.github.com/users/IagoLast/events{/privacy}","received_events_url":"https://api.github.com/users/IagoLast/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-10T11:38:33Z","updated_at":"2017-08-10T12:30:13Z","closed_at":null,"body":"Regarding to this map:\r\n\r\nhttps://mamataakella.carto.com/builder/e623bb0c-b2fd-11e5-b55f-0ea31932ec1d/embed\r\n\r\nAfter some research, I found that is something related to the marker-size.\r\n\r\nThe following includes the 2 scene.yaml files that can be tested in the tangram.play https://gist.github.com/IagoLast/a0c085c71db4e43829f733f60d84caad , notice that the original size property `layers>hash>data>draw` causes tangram to crash.\r\n\r\n### EDIT 1\r\n\r\nI found **2 bugs** in tangram-carto\r\n\r\n#### Default value bug\r\nThere is a [helper function](https://github.com/CartoDB/tangram-carto/blob/master/src/utils/utils.js#L17) in tangram-carto which creates aux functions for variable sizes/colors..etc\r\n\r\nThis helper function sets the [default value to null](https://github.com/CartoDB/tangram-carto/blob/master/src/utils/utils.js#L21), generating problems when the value is not overwritten.\r\nIn the case of this map, for the color, we have the following:\r\n\r\n```javascript\r\nfunction() {\r\n  var _value = null; // Default value --> null\r\n  if ((63 & (1 << $zoom)) && feature['outbreaks'] >= 500) {\r\n    _value = feature['symbol_size'];\r\n  }\r\n  if ((8 & (1 << $zoom)) && feature['outbreaks'] >= 500) {\r\n    _value = feature['symbol_size'] * 2;\r\n  }\r\n  if ((16 & (1 << $zoom)) && feature['outbreaks'] >= 500) {\r\n    _value = feature['symbol_size'] * 4;\r\n  }\r\n  return _value; // Sometimes this function returns null causing a tangram error!\r\n}\r\n```\r\n\r\n#### Colide bug\r\nAcording to the [tangram doc](https://mapzen.com/documentation/tangram/draw/#collide) must be a boolean field.\r\n\r\nTangran-carto gets the `collide` value from the [getCollide(c3ss)](https://github.com/CartoDB/tangram-carto/blob/master/src/basic/points.js#L114).\r\n\r\nIn the case of this map, this function returns 0 instead \"true\" so the map is not looking well.\r\n\r\nAs long as I know the getCollide (which value for this map must be **false**, gets the value from the `maker-allow-overlap` field in the cartocss which now has the following value:\r\n\r\n```json\r\n{\r\n  \"constant\": true,\r\n  \"symbolizer\": \"markers\",\r\n  \"js\": [\r\n    \"if((63 & (1 << ctx.zoom)) && data['outbreaks'] >= 500){_value = true;}\"\r\n  ],\r\n  \"index\": 285\r\n}\r\n```\r\n\r\ncc @alonsogarciapablo @rochoa "},"comment":{"url":"https://api.github.com/repos/CartoDB/tangram-carto/issues/comments/321537307","html_url":"https://github.com/CartoDB/tangram-carto/issues/55#issuecomment-321537307","issue_url":"https://api.github.com/repos/CartoDB/tangram-carto/issues/55","id":321537307,"user":{"login":"IagoLast","id":2657897,"avatar_url":"https://avatars0.githubusercontent.com/u/2657897?v=4","gravatar_id":"","url":"https://api.github.com/users/IagoLast","html_url":"https://github.com/IagoLast","followers_url":"https://api.github.com/users/IagoLast/followers","following_url":"https://api.github.com/users/IagoLast/following{/other_user}","gists_url":"https://api.github.com/users/IagoLast/gists{/gist_id}","starred_url":"https://api.github.com/users/IagoLast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IagoLast/subscriptions","organizations_url":"https://api.github.com/users/IagoLast/orgs","repos_url":"https://api.github.com/users/IagoLast/repos","events_url":"https://api.github.com/users/IagoLast/events{/privacy}","received_events_url":"https://api.github.com/users/IagoLast/received_events","type":"User","site_admin":false},"created_at":"2017-08-10T12:30:13Z","updated_at":"2017-08-10T12:30:13Z","body":"The bug 1 can be fixed changing the default value from **null** to 0. (and praying).\r\n\r\nI need more context to solve the bug 2."}}
{"actor":{"display_login":"IagoLast"}}