Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8729147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:46:55+00:00 2026-06-13T08:46:55+00:00

I have gotten the entire map to display correctly with no issues. However, the

  • 0

I have gotten the entire map to display correctly with no issues. However, the map always loads at coordinates of 0,0. I know I’m passing the longitude and latitude correctly as well.

Here’s the printed json which the gmaps4rails method receives:

[{"lat":40.7142,"lng":74.0064}]

Below is also the code used in various areas of production…

VIEW

<%= @maps %>
<%= gmaps4rails(@maps) %>

MODEL

acts_as_gmappable :process_geocoding => false, :lat => :lat, :lng => :lng

def lat
  40.7142
end

def lng
  74.0064
end

CONTROLLER

@maps = Event.find(params[:id]).to_gmaps4rails

I’ve decided as you’ll see in my model to explicitly pass a latitude and longitude. I do have my database setup with columns latitude and longitude, however, I’m working with test data at the moment and cannot expect a reliable result. Until then, I’ll use the coordinates for New York City, NY.

Here’s the outputted Javascript:

Gmaps.map = new Gmaps4RailsGoogle();
Gmaps.load_map = function() {
Gmaps.map.map_options.auto_adjust = true;
Gmaps.map.initialize();
Gmaps.map.markers = [{"lat":40.7142,"lng":74.0064}];
Gmaps.map.markers_conf.do_clustering = true;
Gmaps.map.create_markers();
Gmaps.map.adjustMapToBounds();
Gmaps.map.callback();
};
Gmaps.oldOnload = window.onload;
 window.onload = function() { Gmaps.triggerOldOnload(); Gmaps.loadMaps(); };

I do get an error Uncaught TypeError: Object #<Gmaps4RailsGoogle> has no method create_markers.

Also, here is a picture of the issue (notice the printed json above the map as done in the view code above):

A lovely little description!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T08:46:56+00:00Added an answer on June 13, 2026 at 8:46 am

    I fixed the issue by using Coffeescript. Before I had manually copied the javascript files because I didn’t want to use Coffeescript on my application.

    My installation was wrong, use Coffeescript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have gotten to know my way around a few programming languages, and I'd
I have gotten the following errors using ruby 1.9.2-p320 with Heroku's Taps-using 'db' commands
I have gotten myself into a catch 22 and cannot seem to find my
I have gotten a great deal of help from KandadaBoggu on my last question
I seem to have gotten confused as to what the css clear keyword means.
I have a client who's wordpress sites have gotten hacked twice by iframe scammers.
I'm new to Java and have gotten myself into a situation where it's evident
After a recent submission I have gotten the following error: Invalid Signature - the
I have been learning Hibernate for the past few weeks, I have gotten most
I'm setting up a new project and have gotten NHibernate to work with structuremap...sorta.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.