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

  • SEARCH
  • Home
  • 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 3751312
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:03:24+00:00 2026-05-19T09:03:24+00:00

I have my map working and displaying correctly. I trying to get it to

  • 0

I have my map working and displaying correctly. I trying to get it to update but I am running into issues.

From What I have gotten from searching on the web it seems to be easy to implement.

In my controller in the update I have

 def update
    @map = Variable.new("map")
    @marker = GMarker.new([75.89,-42.767],:title => "Update", :info_window => "I have been placed through RJS")
 end

In my update.rjs I have

page << @map.clear_overlays
page << @map.add_overlay(@marker)

In html.erb I am trying to set a link to this and I currently have the follow

<%=link_to "update", google_map_path(@google_map),:remote => true %>

The problem is for sure in the google_map_path(@google_map). My url to the update is wrong I am pretty sure resulting in the map not updating when I give it a new latitude and longitude.

  • 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-05-19T09:03:25+00:00Added an answer on May 19, 2026 at 9:03 am

    Since it is an update method, perhaps the link should include a method something like this?

    <%=link_to "update", google_map_path(@google_map), :method => :put, :remote => true %>
    

    What does the route look like?

    Hi… I’m just updating this with an example from one of my projects. I’m not sure this will be any help at all, but at least you’ll see what is expected. I have an rsvp controller.

    In config/routes.rb I have this

    resources :rsvps
    

    In my view I have this:

    <%=link_to "update", rsvp_path(@rsvp), :method => :put, :remote => true %>
    

    And this is the HTML that is rendered.

    <a rel="nofollow" data-remote="true" data-method="put" href="/rsvps/4">update</a>
    

    If you are getting an error about it finding the route, double check the name of the route that you want to use and make sure it is correct.

    You can also test by manually entering the path with something like this:

    <%=link_to "update", "/rsvps/#{@rsvp.id}", :method => :put, :remote => true %>
    

    Once you get it to render the correct anchor to the page, then you can start trouble shooting the javascript for the ajax request.

    Good luck.

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

Sidebar

Related Questions

I have a Google Map that suddenly stopped working for no apparent reason (I
I want to have a map that has a homogeneous key type but heterogeneous
I have one Servlet that does insertion into my database. This is working fine.
I have a super simple map reduce test... that isn't working consistently. In a
I have been working with the map view and came across these variables: span.longitudeDelta
I'm working with MKMapView and have plotted several points on the map. I have
I am working with Mapkit and I have to show annotations in the map
I have some code (which I cannot change) that I need to get working
I have unsorted map of key value pairs. input = { xa => xavalue,
I have a Map which is to be modified by several threads concurrently. There

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.