Skip to content

From 0.x.x to 1.x.x

apneadiving edited this page Aug 31, 2011 · 3 revisions

##My previous code is broken! What changed?

First of all, sorry for the (necessary) changes.

Though, the migration should only have slight impacts:

  • CSS: the CSS of the map container and the map itself has been moved from id to class

  • Since I'm now using objects and no more namespaces, Gmaps4Rails.foo is now Gmaps.your_map_id.foo, by default Gmaps.map.foo. So if you want to get the Api map object, you end up doing: Gmaps.your_map_id.map (default Gmaps.map.map). And calls to functions are: Gmaps.your_map_id.function_name

This changes have been implied by the new ability of the gem to display multiple maps on the same page. It lead to OOP instead of mere namespacing and the use of CSS classes instead of Ids.