johnbender.us

recent / categories / archives

Posted
11 November 2008 @ 8pm

Tagged
rubyonrails

ym4r_gm patch submitted!

As promised I submitted my ym4r google maps rails plugin patch. That’s pretty much the first patch I’ve ever submitted for anything, so here’s hoping they don’t come back and lambast me for my ridiculously stupid idea.

If you look at the diff its around 5 lines but I thought it was a pretty nice little extra. I just added a :function option that lets you specify a function that you can call in javascript client side to actually render the map instead of the the default window.onload or automatic. Here’s what using the option looks like

and this renders as the following in the page

Meaning you can just call it whenever you would like.

I added this in because I was loading 5 – 10 map divs per page and they were display=none, so it didn’t make sense to send the call to Google for the map unless the user wanted to view the hidden map. Here’s hoping they except the patch!

No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment