My objective is to add circles in place of markers to show the general area of the location of the each tool in the Tool model. I was able to add circles based on other answers on SO, however using the following code I get the error in the title of this question.

In my controller:

def index
  @tools = Tool.all
  @json=Tool.all.to_gmaps4rails

  @circles = Tool.all{|t| {:longitude => t.longitude, :latitude => t.latitude, :radius =>"1000" }}.to_json 
  respond_to do |format|
    format.html # index.html.erb
    format.json { render json: @tools }
  end
end

In my view file:

<%= gmaps({ "markers" => {"data" => @circles}, "circles" => { "data" => @circles} }  ) %>

The JavaScript error directs me to the line 401 in the gmaps4rails.googlemaps.js file:

  this.boundsObject.extend(circle.serviceObject.getBounds().getNorthEast());

Any ideas why?

Edit
Report