Skip to content

Add geocode rake task to geocode locations in meetups.yml using the geoc...#3

Closed
solsberg wants to merge 4 commits intosandraor:masterfrom
solsberg:geocode_meetups
Closed

Add geocode rake task to geocode locations in meetups.yml using the geoc...#3
solsberg wants to merge 4 commits intosandraor:masterfrom
solsberg:geocode_meetups

Conversation

@solsberg
Copy link

@solsberg solsberg commented Jan 9, 2015

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 geocode
This 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 ;)

…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
@solsberg
Copy link
Author

solsberg commented Jan 9, 2015

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
@solsberg
Copy link
Author

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.

@wifelette
Copy link

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...

@wifelette
Copy link

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.

@solsberg
Copy link
Author

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

@wifelette
Copy link

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!

@solsberg
Copy link
Author

OK. I'll try to take another look in the next day or 2, and probably create
a new branch and submit a new pull request.
Thanks

On Sun, Jan 11, 2015 at 2:42 PM, Leah Silber notifications@github.com
wrote:

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 https://github.com/sandraor, correct me if you think
otherwise)

I'm excited!


Reply to this email directly or view it on GitHub
#3 (comment).

@solsberg solsberg mentioned this pull request Jan 13, 2015
@solsberg
Copy link
Author

This is replaced by #10

@solsberg solsberg closed this Jan 13, 2015
solsberg pushed a commit to solsberg/website that referenced this pull request Mar 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants