0

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.

1 Answer 1

0

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
{
.
.
.
}
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.