{"action":"created","issue":{"url":"https://api.github.com/repos/jgrayson-apl/VectorBasemapStyleEditor/issues/2","repository_url":"https://api.github.com/repos/jgrayson-apl/VectorBasemapStyleEditor","labels_url":"https://api.github.com/repos/jgrayson-apl/VectorBasemapStyleEditor/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/jgrayson-apl/VectorBasemapStyleEditor/issues/2/comments","events_url":"https://api.github.com/repos/jgrayson-apl/VectorBasemapStyleEditor/issues/2/events","html_url":"https://github.com/jgrayson-apl/VectorBasemapStyleEditor/issues/2","id":157431063,"number":2,"title":"I can't not preview the map","user":{"login":"hhkaos","id":826965,"avatar_url":"https://avatars.githubusercontent.com/u/826965?v=3","gravatar_id":"","url":"https://api.github.com/users/hhkaos","html_url":"https://github.com/hhkaos","followers_url":"https://api.github.com/users/hhkaos/followers","following_url":"https://api.github.com/users/hhkaos/following{/other_user}","gists_url":"https://api.github.com/users/hhkaos/gists{/gist_id}","starred_url":"https://api.github.com/users/hhkaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhkaos/subscriptions","organizations_url":"https://api.github.com/users/hhkaos/orgs","repos_url":"https://api.github.com/users/hhkaos/repos","events_url":"https://api.github.com/users/hhkaos/events{/privacy}","received_events_url":"https://api.github.com/users/hhkaos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-05-30T04:53:53Z","updated_at":"2016-09-10T12:30:27Z","closed_at":null,"body":"Hi @jgrayson-apl, I'm trying to use the app but I'm getting some errors trying to load the map at the bottom left. These are the messages that appears in the console.\r\n\r\n```\r\ninit.js:199 TypeError: Cannot read property 'remove' of undefined(…) \"TypeError: Cannot read property 'remove' of undefined\r\n    at q._unsetMap (http://js.arcgis.com/3.16/init.js:919:134)\r\n    at f.removeLayer (http://js.arcgis.com/3.16/init.js:383:460)\r\n    at f.removeAllLayers (http://js.arcgis.com/3.16/init.js:384:208)\r\n    at .<anonymous> (http://maps.esri.com/AGSJS_Demos/templates/VectorBasemapStyleEditor/js/main.js:900:20)\r\n    at http://js.arcgis.com/3.16/init.js:167:296\r\n    at k (http://js.arcgis.com/3.16/init.js:189:431)\r\n    at q (http://js.arcgis.com/3.16/init.js:189:357)\r\n    at resolve (http://js.arcgis.com/3.16/init.js:191:441)\r\n    at .<anonymous> (http://maps.esri.com/AGSJS_Demos/templates/VectorBasemapStyleEditor/js/main.js:846:20)\r\n    at http://js.arcgis.com/3.16/init.js:167:296\r\n    ----------------------------------------\r\n    rejected at a (http://js.arcgis.com/3.16/init.js:190:337)\r\n    at k (http://js.arcgis.com/3.16/init.js:190:89)\r\n    at q (http://js.arcgis.com/3.16/init.js:189:357)\r\n    at resolve (http://js.arcgis.com/3.16/init.js:191:441)\r\n    at .<anonymous> (http://maps.esri.com/AGSJS_Demos/templates/VectorBasemapStyleEditor/js/main.js:846:20)\r\n    at http://js.arcgis.com/3.16/init.js:167:296\r\n    at c (http://js.arcgis.com/3.16/init.js:66:221)\r\n    at d (http://js.arcgis.com/3.16/init.js:66:10)\r\n    at resolve.callback (http://js.arcgis.com/3.16/init.js:67:350)\r\n    at c (http://js.arcgis.com/3.16/init.js:66:436)\r\n    ----------------------------------------\r\nError\r\n    at then.b.then (http://js.arcgis.com/3.16/init.js:192:253)\r\n    at declare.itemSelected (http://maps.esri.com/AGSJS_Demos/templates/VectorBasemapStyleEditor/js/main.js:860:31)\r\n    at .<anonymous> (http://maps.esri.com/AGSJS_Demos/templates/VectorBasemapStyleEditor/js/main.js:293:14)\r\n    at HTMLDivElement.<anonymous> (http://js.arcgis.com/3.16/init.js:167:296)\r\n    at Function.k.emit (http://js.arcgis.com/3.16/init.js:211:269)\r\n    at w._fireSelectionEvent (http://js.arcgis.com/3.16/dgrid/Selection.js:13:103)\r\n    at w._fireSelectionEvents (http://js.arcgis.com/3.16/dgrid/Selection.js:13:236)\r\n    at w.select (http://js.arcgis.com/3.16/dgrid/Selection.js:15:274)\r\n    at w._singleSelectionHandler (http://js.arcgis.com/3.16/dgrid/Selection.js:8:484)\r\n    at w._handleSelect (http://js.arcgis.com/3.16/dgrid/Selection.js:8:279)\"\r\n2\r\ninit.js:360 Uncaught TypeError: Cannot read property 'getWidth' of undefined\r\n2\r\nmain.js:418 Uncaught TypeError: Cannot read property 'data' of undefined\r\n4\r\ninit.js:360 Uncaught TypeError: Cannot read property 'getWidth' of undefined\r\n```\r\n\r\nAny ideas? This Tuesday we have a Developer Summit and I was planning to show it, maybe I can do a quickfix.\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/jgrayson-apl/VectorBasemapStyleEditor/issues/comments/246109214","html_url":"https://github.com/jgrayson-apl/VectorBasemapStyleEditor/issues/2#issuecomment-246109214","issue_url":"https://api.github.com/repos/jgrayson-apl/VectorBasemapStyleEditor/issues/2","id":246109214,"user":{"login":"hhkaos","id":826965,"avatar_url":"https://avatars.githubusercontent.com/u/826965?v=3","gravatar_id":"","url":"https://api.github.com/users/hhkaos","html_url":"https://github.com/hhkaos","followers_url":"https://api.github.com/users/hhkaos/followers","following_url":"https://api.github.com/users/hhkaos/following{/other_user}","gists_url":"https://api.github.com/users/hhkaos/gists{/gist_id}","starred_url":"https://api.github.com/users/hhkaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhkaos/subscriptions","organizations_url":"https://api.github.com/users/hhkaos/orgs","repos_url":"https://api.github.com/users/hhkaos/repos","events_url":"https://api.github.com/users/hhkaos/events{/privacy}","received_events_url":"https://api.github.com/users/hhkaos/received_events","type":"User","site_admin":false},"created_at":"2016-09-10T12:30:27Z","updated_at":"2016-09-10T12:30:27Z","body":"Thank's John, sorry I didn't see this email before.\r\n\r\nIt's work perfectly with other items but I've checked that I can not preview [this item](https://www.arcgis.com/home/item.html?id=11f6905de3974550820d41b1ed5eceb6). \r\n\r\nAnother suggestion: It would be also nice that when you click on \"Pick color\" it forces the \"Find by color\" tab to be selected (in case the user would be in the \"Style layers\"). I forgot that and I though that the \"Pick color\" action was broken... ^_^''. I think this can be done adding this:\r\n\r\n```js\r\nvar tabPanel = registry.byId(\"main-center-pane\");\r\nvar tabs = tabPanel.getChildren();\r\ntabPanel.selectChild(tabs[1]);\r\n```\r\n\r\nAfter [line 1036 in main.js](https://github.com/jgrayson-apl/VectorBasemapStyleEditor/blob/master/js/main.js#L1036)\r\n\r\nBy the way, my local version is not working now because **StyleUpdate.js** is not in [js/Operations/](https://github.com/jgrayson-apl/VectorBasemapStyleEditor/tree/master/js/Operations) folder as main.js requests [in line 61](https://github.com/jgrayson-apl/VectorBasemapStyleEditor/blob/master/js/main.js#L61)\r\n\r\nCheers!"}}
{"actor":{"display_login":"hhkaos"}}