2012-04-05 84 views
0

指定的图钉文本未显示在地图上(Bing Maps Ajax 7.0控件)。必应地图Ajax 7.0图钉文本不显示

下面是代码,从交互式SDK几乎复制:我认为会出现此给出代码

var offset = new Microsoft.Maps.Point(0, 5); 
alert($(".LocationPushPin a", $(this)).text()); 
var pushpinOptions = {text: $(".LocationPushPin a", $(this)).text(), visible: true, textOffset: offset}; 
var pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location($(".RetailLocationLatitude", $(this)).text(), $(".RetailLocationLongitude", $(this)).text(), pushpinOptions)); 
BingMap.entities.push(pushpin); 

警报的确显示的值(“1001”等)。 Firebug或IE9调试器中没有语法或其他错误。

我错过了什么?感谢你给与我的帮助。

+0

我有一个放错地方的括号(是选项之后,文本之后没有),这禁用选项功能: var pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location($(“。RetailLocationLatitude”,$(this)).text(),$(“。RetailLocationLongitude”,$( this)).text()),pushpinOptions); 对不起。 – 2012-04-05 09:54:13

回答

0

我有一个放错地方的括号(是选项之后。

var pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location($(".RetailLocationLatitude", $(this)).text(), $(".RetailLocationLongitude", $(this)).text()), pushpinOptions); 

对不起,你的麻烦,在审查这个问题