Add geocode rake task to geocode locations in meetups.yml using the geoc...#3
Add geocode rake task to geocode locations in meetups.yml using the geoc...#3solsberg wants to merge 4 commits intosandraor:masterfrom
Conversation
…eocoder gem. Add markers for the geocoded meetup locations to the map on the meetups page.
…eocoder gem. Add markers for the geocoded meetup locations to the map on the meetups page.
…into geocode_meetups Conflicts: Rakefile config.rb data/meetups.yml source/meetups.html.erb
|
I have rebased my branch so that it now builds upon the changes in #1 |
which is directly loaded by the javascript at runtime to build the markers
|
I have refactored my PR again so that now the geocoded locations are written to a separate json file (leaving the original meetups.yml unmodified). The json data is loaded at runtime and used to build the markers. |
|
I assume this keeps getting missed because it doesn't have a needed reference to emberjs#1904. So first, there, now it does 😛. Second, can this be rebased (again)? Might want to wait until @lzcabrera and @andrewbranch get their current conflict sorted though, so it's hopefully the last needed rebase... |
|
I should add... if it's still needed. There's probably some overlap in the work, but hopefully much of both bits are still useful. |
|
it looks like the @lzcabrera PR already includes an alternative approach to generating the markers, the main differences being that my approach uses an underscore template to generate the infowindow html rather than a more imperative approach with javascript, and also I put the data in a separate json file rather than in a meta tag on the page. So if that one gets accepted then I guess the only question is whether you want to use my approach of calculating the lon/lat coordinates in a separate rake task rather than manually providing entering these values into the meetups.yml file |
|
The geocoder rake approach seems vastly superior—less manual data entry required :) Pretty please do separate this out and resubmit or edit this PR. (@sandraor, correct me if you think otherwise) I'm excited! |
|
OK. I'll try to take another look in the next day or 2, and probably create On Sun, Jan 11, 2015 at 2:42 PM, Leah Silber notifications@github.com
|
|
This is replaced by #10 |
Edits to the compiling templates blog post
I've taken a swing at geocoding the locations in meetups.yml and then creating the markers for this geocoded data.
The geocoding process is handled by a rake task:
rake geocodeThis uses the geocoder gem to calculate lon/lat coordinates for all location records in meetups.yml that don't currently have values for these keys. It rewrites the new data back to the same file.
I have then updated the script in meetups.html.erb to create markers for all these locations - via a helper in config.rb
I also added javascript to center the map at the user's current location using the geolocation API, given permission.
fyi: my first attempt at a pull request ;)