Polygon Click Event that updates an Div using ajax call

56 views
Skip to first unread message

mreyeros

unread,
Jun 9, 2011, 1:56:31 PM6/9/11
to google-map...@googlegroups.com
Go0d afternoon everyone, I currently have a map that displays zip code boundaries on a map.  When the user clicks on a zipcode polygon i am opening a jquery dialog that asks the user to confirm their zip code selection.  The confirmation makes an ajax call that stores the selected zip code in my database.  Once the callback from the ajax call is hit I am wanting to refresh a div that contains a table of all selected zip codes for the user.  Everything seems to be working fine except for the refreshing of the div.  I am using $.post(...) to send the data across for storing and again in the callback function if there were no errors sent back I am using $(selector).load(url) to refresh the div.  I know that this works because in my table that appears in the div i have a delete option that uses a similar workflow and the refresh works perfectly.  I am not sure if this is something specific to how the eventlisteners work with google maps but any help would be appreciated.

geoco...@gmail.com

unread,
Jun 9, 2011, 3:18:31 PM6/9/11
to Google Maps JavaScript API v3
This problem doesn't sound like it has anything to do with the topic
of this group, where is the problem with the Google Maps API v3?
Have you tried asking (or searching) a jquery group?

-- Larry

mreyeros

unread,
Jun 9, 2011, 3:22:36 PM6/9/11
to google-map...@googlegroups.com
Thanks for your quick response, I am not sure if the issue is with jquery per se.  Like I mentioned above in the div which I am updating there is code bound to a button that does the exact same ajax call that ultimately refreshes the div and that one is working.  When I bind the click event of the polygon to call my ajax function the refresh appears to happen but the grid does not get updated.  If I refresh the page then I see that the database actually did get updated.

Andrew Leach

unread,
Jun 9, 2011, 3:45:00 PM6/9/11
to google-map...@googlegroups.com

Updating a table doesn't seem to have much to do with a mapping API.
Perhaps if you posted a link (NOT code) someone might be able to see
what's happening -- or rather, why it's not happening.

Reply all
Reply to author
Forward
0 new messages