function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JmBessonartJmBessonart 

Google Map VS Rerender - Problem

Hi, i have a problem using a commandLink with the rerender attribute and a google map in the same page (the google map ISN'T into the component that i'm rerendering....)

 

This is  a simple example of my code:

 

 

This is the visualforce page :

 

<script>
window.onload = initializeGoogleMap;

function initializeGoogleMap() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("GoogleMapHolder"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
}
}
</script>
<apex:outputpanel id="aux"></apex:outputpanel>
<apex:form >
<apex:commandLink action="{!refresh}" rerender="aux" value="Refresh Aux"/>
</apex:form>
<div id="GoogleMapHolder" style="width: 315px; height: 330px"></div>

 

And the controller:

 

 

public void refresh () {}

 

When the action finished, the page turn all white and loading, and never stop...

 

Any idea of what cause this behavior???

 

Thanks

 

J. 

SteveBowerSteveBower

I wonder if you're messing up Salesforce's onload usage by overriding window.onload with your own function.

 

Perhaps use an Iframe inside an outputpanel for the google image instead.

 

Just a thought, Steve.

JmBessonartJmBessonart

Thanks for the reply. The onload isn't the problem. In my page i use jquery and don't cause any problem.

 

I'm going to try the iframe suggestion and let you know.

 

Regards

Juan.

JmBessonartJmBessonart

I put the google map into an iframe and solved the problem!! Now i can rerender component without problems.

 

Thanks

Juan.