Codice PHP:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="http://dev.virtualearth.net/mapcontrol/v4/mapcontrol.js"></script>
<script>
var map = null;
var pinID=1;
function GetMap()
{
map = new VEMap('myMap');
map.LoadMap();
}
var locs = new Array;
var loc = new VELatLong(45.598065, 9.971638);
locs.push(loc);
var loc = new VELatLong(45.61516, 10.10970);
locs.push(loc);
var loc = new VELatLong(45.655441, 10.026762);
locs.push(loc);
var loc = new VELatLong(45.659902, 10.047051);
locs.push(loc);
var loc = new VELatLong(45.661387, 10.048349);
locs.push(loc);
var loc = new VELatLong(45.65991, 10.047855);
locs.push(loc);
var loc = new VELatLong(45.58995, 10.11026);
locs.push(loc);
var loc = new VELatLong(45.597645, 10.054207);
locs.push(loc);
for (i=0; i < locs.length; i++)
{
var pin = new VEPushpin(pinID, locs[i], 'http://localhost/lavori/map/point.gif', 'A point', 'location number');
alert(i);map.AddPushpin(pin);
pinID++;
}
DoBestMap(locs);
function DoBestMap(locs)
{
map.SetMapView(locs);
}
</script>
</head>
<body onLoad="GetMap();">
<div id='myMap' style="position:relative; width:100%; height:100%;"></div>
</body>
</html>
Salve ragazzi, ho questo codice che però funziona solo con IE 7. C'è qualche modo per aggirarlo e renderlo compatibile con FF o IE 6 ?