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 3951050
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:41:01+00:00 2026-05-20T01:41:01+00:00

I am using markers on a map to show and update the position of

  • 0

I am using markers on a map to show and update the position of a point model in my app. When the point is moved I have a javascript event which updates the position of said point.

This all works fine until some point model validation fails and the edit page rendered with errors. The map is gone. I understand that ‘render’ won’t actually execute code in the controller like calling an action via redirect_to.

As a result I moved my map generation code from the controller to the points helper so this is the sort of thing I have in my view;

<% map = generate_map_for_point(point) %>
<% content_for :head do %>
 <% if map %>
  <%= GMap.header(:with_vml => false, :host => request.host) %>
  <%= map.to_html %> 
 <% end %>
<% end %>

This doesn’t work either. Finally, I’ve made the form_for a remote_form_for and moved the map into a partial along with the map init javascript. Now the map init javascript isn’t contained in the header but I still have the same problem…

  • 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-20T01:41:01+00:00Added an answer on May 20, 2026 at 1:41 am

    I lie, in fact putting the map code in the helper appears to have resolved the problem. I’m sure it wasn’t working before. Oh well, maybe I moved on to putting it in a partial to quickly and overcomplicated the situation.

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

Sidebar

Related Questions

I am making an app in which i have to show Map in my
I have found a code to show Google maps with multiple markers using JQuery
I'm using the Google Maps API v2. I add markers to the map and
I have an application that uses the mapview-overlay-manager code to draw map markers on
I have a Google Map on our site that has a list of markers
I have a task to show 458 markers to show in Android maps. And
On my map I have some Markers. Onclick I want to get the markers
I am using Google Maps API 3 to show a google map of Canada
I'm using Google Maps Javascript API for showing a map in my site with
I'm trying to add markers to a Google maps using V3. I have my

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.