Hello!
I already red a lot of posts about these two problems, but didn't
found a solution for my problem. There are only few scripts with
checkResize() function included from which i could learn from.
<code>
....
google.load("maps", "2");
function initialize() {
var m = document.getElementById("Gmap");
m.style.height = "470px";
m.style.width = "624px";
//m.checkResize();
var map = new google.maps.Map2(m);
map.checkResize();
map.setCenter(new GLatLng(56.9, 24.6), 7);
map.setMapType(google.maps.NORMAL_MAP);
map.addControl(new google.maps.SmallMapControl()); // smaller pan/
zoom control NW corner
map.addControl(new google.maps.MapTypeControl()); // toggle btw map
types
function createMarker(point,nov,adr){
var marker = new google.maps.Marker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml("Novietne: <b>" + nov +
"</b><br>Adrese:
<b>" + adr + "</b>");
});
return marker;
}
var sk = document.getElementsByName('vars').length;
for (var i = 0; i<sk ; i++){
var variables = document.getElementsByName('vars').item(i);
var map_info=variables.value.split("||");
var nr=0;
while(nr<map_info.length){
//alert(map_info[nr]);
nr+=1;
var lat = map_info[0];
var lon = map_info[1];
var novietne = map_info[2];
var adrese = map_info[3];
}
var point = new google.maps.LatLng(lat, lon);
map.addOverlay(createMarker(point,map_info[2],map_info[3]))
//map.addOverlay(marker);
}
}
google.setOnLoadCallback(initialize);
</script>
<script language=javascript type='text/javascript'>
function Switch(d) {
if(d == 'Gmap'){
document.getElementById('JSmap').style.display = "none";
document.getElementById(d).style.display = "block";
}
else if(d == 'JSmap'){
document.getElementById('Gmap').style.display = "none";
document.getElementById(d).style.display = "block";
}
}
</script>
</head>
<body onLoad="Switch('JSmap')">
<input type="hidden" name="vars" id="vars" value="55.9702382208||
26.4347895549||LV1607628||TILTI, TILTI">
<input type="hidden" name="vars" id="vars"
value="56.6474195742||
25.236527155||LV1000001||GALATUŅĶI">
....
</code>
The Map shows on FF with no problems.
On IE map appears only in left top corner.
P.S. Sorry for no link. At the moment its on local, and I'm showing
only part of this script because other part of it is full of unneeded
information.
Thank You.
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.