apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

Non-symmetric setter and getter for coords (Array) needed #297

Closed kristianmandrup closed 10 years ago

kristianmandrup commented 11 years ago

Some of the Mongo related gems store the coords in the [lat, lng] form, others in as [lng, lat]. Would be nice to allow defining both a setter method and a getter method for Google-Maps-for-Rails. I think this would solve many issues. This way, the setter can take the coords in what ever form this gem (Google-Maps-for-Rails) delivers them and set them as needed internally. When drawing the map etc. Google-Maps-for-Rails can the read the coords using the specified reader method in the format it expects. Nice and flexible! Would just require an extra (optional) config parameter I would think. Cheers!

apneadiving commented 11 years ago

Hi Kristian,

You already told me and delivered appropriate work. As you know, your pull request contains the exact needed code, it's just too messy to be merged now.

I'd merge it directly if you only push the appropriate code and specs.

Thanks,

Ben

kristianmandrup commented 11 years ago

Okay. I might look into it tmrw then ;)