Krela


Hi folks,

A couple of very basic questions here I'm afraid but I can't find any answers searching.

Firstly the following code doesn't work in firefox 2.0rc3 and I can't see why

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="
http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"></script>
<script>
var map = null;
var layerid=0;
var source="160E6B936FFEBD1!111";

function GetMap()
{
map = new VEMap('mymap');
map.LoadMap(new VELatLong(51.076351, -3.05), 11 ,'h' ,false);
AddMyLayer();
}

function AddMyLayer(type)
{
var veLayerSpec = new VELayerSpecification();
veLayerSpec.Type = VELayerType.VECollection;
veLayerSpec.ID = layerid;
veLayerSpec.LayerSource = source;
veLayerSpec.Method = 'get';
map.AddLayer(veLayerSpec);

layerid++;

}
</script>
</head>
<body onload="GetMap();">
<div id='mymap' style="position:relative; width:400px; height:500px;"></div>
</body>
</html>

I'm also trying to figure out how to customise the content of the pushpin popups so they look similar to the popups you see on local.live itself as each of the pins will have both a photo and a link attached to them.

I'm not good with javascript so any help would be greatfully appreciated.

B.




Re: Firefox problem & another pushpin Q.

variaas


I'm seeing the same issue. Has anyone found a solution to this issue





Re: Firefox problem & another pushpin Q.


Re: Firefox problem & another pushpin Q.

Mukund R

Another hack is

try{map.LoadMap(new VELatLong(latitude, longitude), 8 ,'r' ,false);}

catch(err){}

This will simply ignore the error from firefox.

But I m not sure about this being ebst as this will also ignore any error from IE. :)

But this works well in production. :)






Re: Firefox problem & another pushpin Q.

SoulSolutions

Ah...

Did you test that in FF I was under the impression if you simply suppress the error you can't draw any routes, polylines or polygons

I'd stick with the code in the WIKI.

John.






Re: Firefox problem & another pushpin Q.

Mukund R

yes i tested it with FF. But the best way is to stick with the Wiki Code. i agree. :)