为图钉指定的文本未显示在图钉上(Bing Maps 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 调试器中没有语法或其他错误。
我错过了什么?感谢你给与我的帮助。