Closed ashrocket closed 10 years ago
Actually its easy, go to the wiki page, everything there is about v2.
Click on 'Gmaps4rails before v2' and there is all before v2, including the page you refer to.
To answer your question, see here: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Change-handler-behavior
Oops for custom clusterer, look here https://github.com/apneadiving/Google-Maps-for-Rails/blob/master/vendor/assets/javascripts/gmaps/objects/handler.coffee#L7 In other words, do:
handler = Gmaps.build('Google', { markers: { clusterer: your_options } } )
No way! Really. I'll try it out right away. Thanks
Ashley Raiteri
e: ashley@raiteri.net p: 206.981.8060 github: ash_rocket t: @ashr l: linkedin.com/in/ashleyraiteri b: http://ashley.raiteri.net
On Jan 10, 2014, at 11:31 PM, Benjamin Roth notifications@github.com wrote:
Oops for custom clusterer, look here https://github.com/apneadiving/Google-Maps-for-Rails/blob/master/vendor/assets/javascripts/gmaps/objects/handler.coffee#L7 In other words, do:
handler = Gmaps.build('Google', { markers: { clusterer: your_options } } ) — Reply to this email directly or view it on GitHub.
Totally worked. Should I add to the docs pages to illustrate usage. ?
yep feel free to edit the doc to improve it!
If you think it's correct, and useful, here it is: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Customized-Cluster-Icons
Maybe you can add it to the getting started page under the > 2.x wiki section
Thanks for the quick answer by the way. And for all the working put into the new version of the gem, it's a great improvement. Now we the community of users need to step up provide some good documentation.
It took me a while to figure out how to simply disable clustering altogether. In the end I rolled with this:
handler = Gmaps.build("Google", markers: { clusterer: undefined })
Did I do a terrible thing? Is that snippet wiki worthy?
Well its correct yes :)
Sent from my iPhone
On 29 janv. 2014, at 04:30, Dave Tapley notifications@github.com wrote:
It took me a while to figure out how to simply disable clustering altogether. In the end I rolled with this:
handler = Gmaps.build("Google", markers: { clusterer: undefined })
Did I do a terrible thing? Is that snippet wiki worthy?
— Reply to this email directly or view it on GitHub.
Thanks for suggesting documentation, every contribution is welcome :)
Sent from my iPhone
On 29 janv. 2014, at 04:30, Dave Tapley notifications@github.com wrote:
It took me a while to figure out how to simply disable clustering altogether. In the end I rolled with this:
handler = Gmaps.build("Google", markers: { clusterer: undefined })
Did I do a terrible thing? Is that snippet wiki worthy?
— Reply to this email directly or view it on GitHub.
nope it doesnt exist for v2.x, the proper way is what you did :)
FYI, I've done http://apneadiving.github.io/ to show live examples
Awesome!!! Let us know if you need any help
Ashley Raiteri
e: ashley@raiteri.net p: 206.981.8060 github: ash_rocket t: @ashr l: linkedin.com/in/ashleyraiteri b: http://ashley.raiteri.net
On Feb 3, 2014, at 12:10 AM, Benjamin Roth notifications@github.com wrote:
FYI, I've done http://apneadiving.github.io/ to show live examples
— Reply to this email directly or view it on GitHub.
@ashrocket thank you :) I've done some already, let me know if you think of other interesting one.
Otherwise I'm done with it now :)
It's hard to know whether https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Markers is still a relavent wiki page for doing things like creating custom cluster icons.
I've tried every way I can think of to inject appropirate marker options into the Coffeescript (I'm using asset pipeline so don't want to generate coffee and then modify it, want to hook into your code in the correct place).
So, it could be user / programmer error, but is trying to add a custom cluster function in this way valid?
Gmaps.map.customClusterer = function() { ....
Or is there a better more appropriate way to set custom images on the clustericons?