views:

12

answers:

1

hi

in my web page i am using google map script its working at first time of page loading within update panel but its not working when i click any server control like button(partial post back) so how can i fix this issue.

A: 

When you update an UpdatePanel, all HTML inside is re-rendered. It's possibly you will need to re-initialise the google map script, but we can't really tell unless you post some code...

Jamie Carruthers
<script src="http://bluweb.com/chouser/gmapez/gmapez-2.js" type="text/javascript"></script>
Eswaran
<script src="http://bluweb.com/chouser/gmapez/gmapez-2.js" type="text/javascript"></script> this script i am using for googl map and below div i am using for load the google map <div class="GMapEZ GLargeMapControl GMapTypeControl GScaleControl" style="width: 660px; height: 430px;font-family:Verdana;"> <asp:Literal Id="DisplayPoints" runat="server" /> </div>
Eswaran
Is there a reason you are using this plugin? I would recommend using the Google Maps API instead. You will have much more control over the initialization of your map which is really what you require here as you need to re-bind the map after the postback is complete. http://code.google.com/apis/maps/documentation/javascript/
Jamie Carruthers
http://code.google.com/apis/maps/documentation/javascript/tutorial.html - Follow this tutorial and get it working. After you have done that, you need to discover when the UpdatePanel has finished updating, at which point you will need to re-initialize your map. The method in this link is what you require to detect the completion of your partial postback on the client: http://msdn.microsoft.com/en-us/library/bb383810.aspx
Jamie Carruthers