我们在 DotNetNuke 6.0 皮肤中使用以下代码:
<iframe width="310" height="226" frameborder="0" scrolling="no" marginheight="0"
marginwidth="0" src="http://maps.google.com/maps? f=d&source=s_d&saddr=Howell+Sand+Co+INC++2300+East+Hastings+Avenue+Amarillo,+TX+79108,+United+State+of+America+(806)+383-1721&daddr=&hl=en&geocode=&aq=&sll=37.0625,-95.677068&sspn=49.624204,79.013672&mra=ls&ie=UTF8&ll=37.0625,-95.677068&spn=49.624204,79.013672&t=m&iwloc=ddw0&output=embed">
</iframe>
<br />
<small><a href="http://maps.google.com/maps?f=d&source=embed&saddr=Howell+Sand+Co+INC++2300+East+Hastings+Avenue+Amarillo,+TX+79108,+United+State+of+America+(806)+383-1721&daddr=&hl=en&geocode=&aq=&sll=37.0625,-95.677068&sspn=49.624204,79.013672&mra=ls&ie=UTF8&ll=37.0625,-95.677068&spn=49.624204,79.013672&t=m&iwloc=ddw0"
style="color: #0000FF; text-align: left">View Larger Map</a></small>
在当前状态下,地图会在页面上呈现。但是,它呈现的位置不是正确的地址。请在此处查看当前行为
我已经进一步阅读了静态地图 API,并且想知道是否应该重写上述内容以调用该 API?或者,我们应该采取不同的方法吗?
更新:我重写了 javascript,如下所示:
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(35.249369, -101.807561)
};
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
GEvent.addListener(marker, "mouseover ", function() {
marker.openInfoWindowHtml(" < html > < body style = \"font-size: 8px;\"><table><tr><td align='left'><b>Company:</b> </td><td>Howell Sand Co Inc.<br/></td></tr>" + "<tr><td style=\"vertical-align:top;\"><b>Address:</b> </td><td>2300 East Hastings Avenue,<br/> Amarillo, TX 79108 (806) 383-1721 </td>" + "</tr></body></html>");
});
map.addOverlay(marker);
}
$(document).ready(function() {
initialize();
});
不幸的是,此时地图根本不会渲染。必须做些什么来修改上述代码以呈现正确的地图和位置?