Bing Map Ajax 7.0图钉文字没有显示

时间:2012-04-05 02:52:52

标签: bing-maps

针脚上没有显示为图钉指定的文本(Bing Maps Ajax 7.0 Control)。

以下是从交互式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调试器中没有语法或其他错误。

我错过了什么?谢谢你能给我的任何帮助。

1 个答案:

答案 0 :(得分:0)

我的括号错位(在选项之后:

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

很抱歉您在审核此问题时遇到了麻烦。