{"action":"created","issue":{"url":"https://api.github.com/repos/magdalena19/lberg-map/issues/10","repository_url":"https://api.github.com/repos/magdalena19/lberg-map","labels_url":"https://api.github.com/repos/magdalena19/lberg-map/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/magdalena19/lberg-map/issues/10/comments","events_url":"https://api.github.com/repos/magdalena19/lberg-map/issues/10/events","html_url":"https://github.com/magdalena19/lberg-map/issues/10","id":151237165,"number":10,"title":"Geocoding","user":{"login":"andneuma","id":12527312,"avatar_url":"https://avatars.githubusercontent.com/u/12527312?v=3","gravatar_id":"","url":"https://api.github.com/users/andneuma","html_url":"https://github.com/andneuma","followers_url":"https://api.github.com/users/andneuma/followers","following_url":"https://api.github.com/users/andneuma/following{/other_user}","gists_url":"https://api.github.com/users/andneuma/gists{/gist_id}","starred_url":"https://api.github.com/users/andneuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andneuma/subscriptions","organizations_url":"https://api.github.com/users/andneuma/orgs","repos_url":"https://api.github.com/users/andneuma/repos","events_url":"https://api.github.com/users/andneuma/events{/privacy}","received_events_url":"https://api.github.com/users/andneuma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-26T20:56:47Z","updated_at":"2016-05-03T13:32:21Z","closed_at":null,"body":"###### Implementierung\r\nMomentan mit `geocoder` gem. Einfachste Benutzung in Konsole (irb / pry / rails console): `Geocoder.search <address>`, gibt ein Array von Result-Objekten zurück, wo man jeweils mit `.data` die Daten abfragen kann\r\n\r\n###### Todos / offene Fragen\r\n- [x] Validierung falscher Adressen\r\n  * Hab nochmal in der Konsole mit `geocoder` ein bisschen rumgespielt. Das Ding ist, dass der für die [google API](https://developers.google.com/maps/documentation/geocoding/intro) einem eigentlich immer Lat/Lon ausspuckt, ne falsche Adresse in dem Sinne gibts also solange nicht, wie in den Feldern überhaupt etwas drinsteht (wird über validations sichergestellt). Interessant in dem Zusammenhang: 'oijwg' findet man unter 47.203492/14.8026 ;) Aber google wollen wir ja nicht...\r\n  * Wenn wir nominatim nutzen spuckt der `nil` aus. Ist sogar gut für Tests und Validierungen\r\n- [ ] Fehlermeldung bei falscher Adresse\r\n  * Adresse überprüfen\r\n  * Lat / Lon manuell eintragen\r\n  => flash[:danger] ist gesetzt, Anzeige Teil von Layout-Todo\r\n\r\n- [ ] Preview des erstellten POIs"},"comment":{"url":"https://api.github.com/repos/magdalena19/lberg-map/issues/comments/216528426","html_url":"https://github.com/magdalena19/lberg-map/issues/10#issuecomment-216528426","issue_url":"https://api.github.com/repos/magdalena19/lberg-map/issues/10","id":216528426,"user":{"login":"andneuma","id":12527312,"avatar_url":"https://avatars.githubusercontent.com/u/12527312?v=3","gravatar_id":"","url":"https://api.github.com/users/andneuma","html_url":"https://github.com/andneuma","followers_url":"https://api.github.com/users/andneuma/followers","following_url":"https://api.github.com/users/andneuma/following{/other_user}","gists_url":"https://api.github.com/users/andneuma/gists{/gist_id}","starred_url":"https://api.github.com/users/andneuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andneuma/subscriptions","organizations_url":"https://api.github.com/users/andneuma/orgs","repos_url":"https://api.github.com/users/andneuma/repos","events_url":"https://api.github.com/users/andneuma/events{/privacy}","received_events_url":"https://api.github.com/users/andneuma/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T13:32:21Z","updated_at":"2016-05-03T13:32:21Z","body":"> Ich baue das Reverse-Geocoding (Klick auf Karte mit Redirect zum vorbefüllten Formular)\r\n\r\n\"Take from current location\" wäre cool (wie bei der alten Map)"}}