Ciao a tutti.
Volevo chiedere se qualcuno era in grado di capire perchè questo script con ie non funziona. Io non sono pratico di javascript ed è un giorno che sto diventando matto. E' uno script fantastico se andasse anche su ie!! (ve lo stra consiglio!)
<script type="text/javascript" src="http://www.google.com/jsapi?key=VOSTRA GOOGLEKEY"></script>
<script type="text/javascript">
google.load("jquery", '1.3');
google.load("maps", "2.x");
</script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){ //Start script when ready
//Checks to see that the page element exists and to prevent conflict with other maps
var markers = new Array();
markers[0] = new Array(new GMarker(new GLatLng(12.345678,12.345678)), "Dati della colonna", "Dai Tips sulla mappa");
var map = new google.maps.Map2($("#map_canvas").get(0));
map.setUIToDefault();
map.setCenter(new GLatLng(markers[0][0]), 3);//Set location to first array item
$.each(markers,function(i,marker){
var delayTime = ((i * 5000) / (0.5 * markers.length));//Delay time decreases as number of markers increases
setTimeout(function(){
map.addOverlay(marker[0]);
$("<li />")
.html(markers[i][1])//Use list item label from array
.click(function(){
displayPoint(marker[0], i);
setActive(this);//Show active state
})
.appendTo("#map_list");
GEvent.addListener(marker[0], "click", function(){
displayPoint(marker[0], i);
setActive(i);//Show active location
});
displayPoint(marker[0], i);
setActive(i);//Show active location
if (i == (markers.length - 1)) {//If last item in array
setTimeout(function(){//Remove active class and fade marker after delay
$("#map_message").fadeOut();
//setActive();
}, 3500);
}
}, delayTime);
});
$("#map_list").css("opacity","0.2").animate({opaci ty: 1}, 1100);//Fade in menu
$("#map_message").appendTo(map.getPane(G_MAP_FLOAT _SHADOW_PANE));
function displayPoint(marker, index){
if ($('#map_message').is(':hidden')) {//Allow toggling of markers
$('#map_message').fadeIn();
}
else{//Remove all .active classes and hide markers
$('#map_message').hide();
$(".active").removeClass();
}
//$("#map_message").hide();//Default behaviour, doesn't allow toggling
var moveEnd = GEvent.addListener(map, "moveend", function(){
var markerOffset = map.fromLatLngToDivPixel(marker.getLatLng());
$("#map_message")
.html(markers[index][2])//Use information from array
.fadeIn()
.css({ top:markerOffset.y, left:markerOffset.x });
GEvent.removeListener(moveEnd);
});
map.panTo(marker.getLatLng());
}
function setActive(el){
$(".active").removeClass();//Remove all .active classes
$("#map_list").find('li').eq(el).addClass('active' );//Find list element equal to index number and set active
$(el).addClass('active');//Set active if list element clicked directly
}
//End if map_canvas exists
}); //End onReady
</script>
è possibile vedere lo script direttamente sul sito dell'autore
http://www.erikwhite.net/gmapjquery.html
Grazie mille in anticipo!
Ciao!!