我一直在玩Timemap.js,试图让信息窗口(项目描述)总是为特定项目打开(我的意思是,不必点击它,总是弹出)。出于某种原因,它不起作用......我尝试以不同的方式调用 openInfoWindow 函数,但它不起作用。这只是一个简单/基本的 timemap.js 代码,我所做的唯一“自定义”是将事件从时间线带中隐藏(noEventLoad:true),因为我不需要/不希望它们在那里显示。这是我的整个简单代码:
var tm;
$(function() {
tm = TimeMap.init({
mapId: "map",
timelineId: "timeline",
options: {
mapType: "satellite",
style: "classic",
noEventLoad: true
},
datasets: [
{
id: "events",
title: "Events",
type: "basic",
options: {
mapFilter: "showMomentOnly",
items: [
{
"start" : '2007-01-01T13:02:43Z',
"end" : '2007-01-01T13:20:55Z',
"polyline" : [{
"lat" : 35.706,
"lon" : -90.851681},
{"lat" : 35.703682,
"lon" : -90.84924},
{"lat" : 35.697886,
"lon" : -90.843138},
{"lat" : 35.692091,
"lon" : -90.837037},
],
"title" : 'N487LP-1229',
"options" : {
"theme": 'purple',
"lineWeight": 2,
}
},
]
}
}
],
bandInfo: [
{
width: "00%",
intervalUnit: Timeline.DateTime.SECOND,
intervalPixels: 10000,
},
{
width: "50%",
intervalUnit: Timeline.DateTime.MINUTE,
intervalPixels: 100,
},
{
width: "50%",
intervalUnit: Timeline.DateTime.HOUR,
intervalPixels: 300,
}
],
scrollTo: '2007-01-01T13:02:43Z'
});
});
有任何想法吗?
非常感谢