Anees
Anees

Reputation: 33

set height and width of infowindow gmaps4rails in controller

class VenuesController < ApplicationController

  def index
    @search = Venue.search(params[:search])
    @venues = @search.all(:order => "name ASC")
    @json = @search.all.to_gmaps4rails do |venue, marker|
      marker.infowindow render_to_string(:partial => "info", :locals => { :venue => venue})
    end
  end

end

Upvotes: 0

Views: 390

Answers (1)

Hamdan
Hamdan

Reputation: 193

u need to set these things on the css. THe fact is that the partial that u load have some HTML codes. So you implement some css class to it and then customize this class to appear as you want the box to appear.

Youll find gmaps css on your stylesheets folder.

You cant, or at least is not desirable that you set things from view in controller.

Upvotes: 1

Related Questions