Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

i'm using this code to make my map fullscreen. http://www.doogal.co.uk/FullScreen.php But in my ASP.NET page i've got a timer which is doing postback every 5 seconds. This fullscreen button is working properly till this postback. When postback raises i can't show map anymore and Javascript got no error.

Note : I'm also calling initialize method after every postback.

Any help would be greatly appreciated, Thanks.

share|improve this question

1 Answer

I got the solution, when i try to initialize map on every post it's trying to create a new map object. I just moved my map variable to global and checked it like :

var map=null;

function initialize()
{
.
.
.
if (map == null) {
        map = new google.maps.Map(document.getElementById("ctl00_MainContent_googleMap"), mapProp);
}
else
{
.
.
.
}
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.