PsiPro wrote in post #999938:
> You would be best, IMHO, using a hash and rewriting the JS to be a bit
> more intelligent when adding the markers.

Unfortunately I am not that good in JavaScript so was trying to match 
the input with what the script was using.

I have modified the controller as such

@sites = Array.new
$i = 0
for zone in @zones do
  @sites[$i] = [zone.name,  zone.lat, zone.lng, zone.id]
  $i += 1
end

and in my view I am using to to_json method to get the proper json but I 
have no idea how to modify the script so any help will be greatly 
appreciated.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to