{"action":"created","issue":{"url":"https://api.github.com/repos/camptocamp/ngeo/issues/427","labels_url":"https://api.github.com/repos/camptocamp/ngeo/issues/427/labels{/name}","comments_url":"https://api.github.com/repos/camptocamp/ngeo/issues/427/comments","events_url":"https://api.github.com/repos/camptocamp/ngeo/issues/427/events","html_url":"https://github.com/camptocamp/ngeo/pull/427","id":120179564,"number":427,"title":"location chooser refactoring","user":{"login":"fredj","id":100959,"avatar_url":"https://avatars.githubusercontent.com/u/100959?v=3","gravatar_id":"","url":"https://api.github.com/users/fredj","html_url":"https://github.com/fredj","followers_url":"https://api.github.com/users/fredj/followers","following_url":"https://api.github.com/users/fredj/following{/other_user}","gists_url":"https://api.github.com/users/fredj/gists{/gist_id}","starred_url":"https://api.github.com/users/fredj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredj/subscriptions","organizations_url":"https://api.github.com/users/fredj/orgs","repos_url":"https://api.github.com/users/fredj/repos","events_url":"https://api.github.com/users/fredj/events{/privacy}","received_events_url":"https://api.github.com/users/fredj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/camptocamp/ngeo/labels/GeoMapFish","name":"GeoMapFish","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-12-03T14:11:02Z","updated_at":"2015-12-03T16:17:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/camptocamp/ngeo/pulls/427","html_url":"https://github.com/camptocamp/ngeo/pull/427","diff_url":"https://github.com/camptocamp/ngeo/pull/427.diff","patch_url":"https://github.com/camptocamp/ngeo/pull/427.patch"},"body":"brain dump, work in progress,\r\n\r\nFrom a user perspective, using the location chooser directive could be something like:\r\n```html\r\n<select ngeo-locationchooser ngeo-locationchooser-map=\"ctrl.map\">\r\n  <option extent=\"[-1898084, 4676723, 3972279, 8590299]\" translate>Europa</option>\r\n  <option extent=\"[727681, 5784754, 1094579, 6029353]\" translate>Switzerland</option>\r\n</select>\r\n```\r\n\r\nOr (with `ng-options`):\r\n```html\r\n<select ngeo-locationchooser ngeo-locationchooser-map=\"ctrl.map\"\r\n            ng-options=\"location.label for location in mainCtrl.locations\"></select>\r\n```\r\n\r\nhandle `ng-change` events at `ngeo-locationchooser` level\r\n\r\n\r\nOr (with simple links):\r\n```html\r\n<div ngeo-locationchooser ngeo-locationchooser-map=\"ctrl.map\">\r\n  <a href=\"#\" extent=\"[-1898084, 4676723, 3972279, 8590299]\" translate>Europa</a>\r\n  <a href=\"#\" extent=\"[727681, 5784754, 1094579, 6029353]\" translate>Switzerland</a>\r\n</div>\r\n```\r\n\r\nhandle `ng-click` at `ngeo-locationchooser` level (event bubbling)\r\n\r\nOr (with bootstrap):\r\n```html\r\n<div class=\"dropdown\" ngeo-locationchooser ngeo-locationchooser-map=\"ctrl.map\">\r\n  <button class=\"btn btn-default dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\">\r\n    Dropdown\r\n    <span class=\"caret\"></span>\r\n  </button>\r\n  <ul class=\"dropdown-menu\">\r\n    <li><a href=\"#\" extent=\"[-1898084, 4676723, 3972279, 8590299]\" translate>Europa</a></li>\r\n    <li role=\"separator\" class=\"divider\"></li>\r\n    <li><a href=\"#\" extent=\"[727681, 5784754, 1094579, 6029353]\" translate>Switzerland</a></li>\r\n  </ul>\r\n</div>\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/camptocamp/ngeo/issues/comments/161699100","html_url":"https://github.com/camptocamp/ngeo/pull/427#issuecomment-161699100","issue_url":"https://api.github.com/repos/camptocamp/ngeo/issues/427","id":161699100,"user":{"login":"fredj","id":100959,"avatar_url":"https://avatars.githubusercontent.com/u/100959?v=3","gravatar_id":"","url":"https://api.github.com/users/fredj","html_url":"https://github.com/fredj","followers_url":"https://api.github.com/users/fredj/followers","following_url":"https://api.github.com/users/fredj/following{/other_user}","gists_url":"https://api.github.com/users/fredj/gists{/gist_id}","starred_url":"https://api.github.com/users/fredj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredj/subscriptions","organizations_url":"https://api.github.com/users/fredj/orgs","repos_url":"https://api.github.com/users/fredj/repos","events_url":"https://api.github.com/users/fredj/events{/privacy}","received_events_url":"https://api.github.com/users/fredj/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T16:17:22Z","updated_at":"2015-12-03T16:17:22Z","body":"Some basic code added"}}