Nilesh Kulkarni wrote:
> thanks for reply
> function google_map(){
> for(var j=0; j < locs.length; j++)
> {
> marker=addMarker(locs[i]['lat'], locs[i]['lng'])
> }}
ooo not
var locs = (#...@locations.to_json});
but
locs = (#{locations.to_json});
--
Posted via http://www.ruby-forum
Wayne Simacek wrote:
> Are you using the GeoKit Rails plugin?
>
> On Jul 23, 3:52�am, Max Williams
no...
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails:
thanks for reply
I have done it something like
= render :partial => 'coupons/search', :locals => {:locations =>
business_locations.}
in "_search.html.haml"
:javascript
var locs = (#...@locations.to_json});
function google_map(){
for(var j=0; j < locs.length; j++)
{
marker=addMarker(locs
On Jul 23, 9:52 am, Max Williams
wrote:
> vlain wrote:
> > Wrap variables around <%= %> inside double quote
> > e.g.
> > for(var j=0; j < "<%=locations.length%>"; j++)
>
> > On Jul 22, 4:17 pm, Nilesh Kulkarni
>
> As a slightly more general solution, rather than wrapping the "" around
> the er
Are you using the GeoKit Rails plugin?
On Jul 23, 3:52 am, Max Williams
wrote:
> vlain wrote:
> > Wrap variables around <%= %> inside double quote
> > e.g.
> > for(var j=0; j < "<%=locations.length%>"; j++)
>
> > On Jul 22, 4:17 pm, Nilesh Kulkarni
>
> As a slightly more general solution, rathe
vlain wrote:
> Wrap variables around <%= %> inside double quote
> e.g.
> for(var j=0; j < "<%=locations.length%>"; j++)
>
>
>
> On Jul 22, 4:17�pm, Nilesh Kulkarni
As a slightly more general solution, rather than wrapping the "" around
the erb block, if you call inspect on the object inside
Wrap variables around <%= %> inside double quote
e.g.
for(var j=0; j < "<%=locations.length%>"; j++)
On Jul 22, 4:17 pm, Nilesh Kulkarni
wrote:
> hi all,
>
> I have following problem,
>
> I am using google map api , I have "business_locations" array
> defined in view it contains latitud
7 matches
Mail list logo