The problem was that I wanted to get to a address that was associated with the store. I was using .to_json but this did not include the address information.
First I had var store = @store.to_json but that only gave me the address_id not the address information. After a little digging I got the syntax correct. Here is my code syntax…
This is my head tag:
var storePoint = new GLatLng(stores[i].store.lat, stores[i].store.lng); var storeText = '<div id="gmap-content">'+ '<h4>' + stores[i].store.name + '</h4>'+ '<em>' + stores[i].store.store_address.address + '</em><br />' + '<em>' + stores[i].store.store_address.city + '</em><br />' + '<em>' + stores[i].store.store_address.phone + '</em>' + '</div>'; var storeMarker = new createMarker(storePoint,storeText)
PS. These are just snips and need more code to work..