javascript error when resizing map
Hi all,
I came to know that ,once i put pushpins and trying to resize the map using map.resize function then only this error is shown.
The error is "Invalid argument " on Line 2.
I couldnt resolve this error till now.
As this wont affect the functionality of map resizing and all, but please pull me out from this annoying error.
Thanks in advance
Dias
Jeff,
Thanks for looking into my matter.
As im using a javascript function for resizing panel.
the function is
//This function is to resize the mapdiv
function ResizingMap()
{
try
{
var lenFind = document.getElementById('Findpanel') // this is panel for showing the results of find same as local.live.comvar lenFndPnl = lenFind.style.width;var RezPnl = document.getElementById("divResize"); // this is the panel which i used for placing the buttons for resizing the Find Panel.var lenReZ = RezPnl.style.width;windowWidth=GetWindowWidth();
windowHeight=GetWindowHeight()- 115;
//114lenFind.style.height = windowHeight +
"px" ;lenFind.style.top=
"113px";RezPnl.style.height = windowHeight +
"px" ;RezPnl.style.top=
"113px";var rdWidth;var rdHeight;if(lenFndPnl.length!=0){
lenFndPnl=lenFndPnl.substr(0,lenFndPnl.length-2)
}
//alert(lenFndPnl);if(lenReZ.length!=0){
lenReZ=lenReZ.substr(0,lenReZ.length-2)
}
rdWidth = Number(windowWidth) - Number(lenFndPnl) - Number(lenReZ) - 2 ;rdHeight = Number(windowHeight) ;
map.Resize(rdWidth,rdHeight);
}
catch(e){
DoAlert(
"Resizing: "+e.name);}
}
//
This code is what i am used for resizing the map div. The error occured only after i placed a pushpin in the map.
Once i started getting the error even if i deleted the whole pushpins from my map, it will keep on showing the error.
Sorry for the row code
Thanks
Dias
I got the solution?
I was using V3.1 version.?
I just migrate to v4 version and remove that map.resize from my program.
Before if i comment this map.resize and run means, i cant able to put pushpins where i clicked.
It will place a pushpin some where else in the map.
Now its solved in version 4 retrieving correct latitude and logitude.
Thanks for VE guys
Dias.