下午好,我正在向 OpenLayers 添加一个带有弹出窗口的书签,但我想让这个标记始终处于活动状态,而不仅仅是隐藏,也不需要点击显示。
// popup successful, but the click event is on
marker.events.register("click", marker, function(e){
popup = new OpenLayers.Popup.FramedCloud(data.idunidad,
marker.lonlat,
new OpenLayers.Size(200,200),
'<p>Info HTML</p>',
null,true);
mapa.addPopup(popup);
});
没有鼠标事件的弹出窗口
// popup without mouse event
popup = new OpenLayers.Popup.FramedCloud(data.idunidad,
marker.lonlat,
new OpenLayers.Size(200,200),
'<p>Info HTML</p>',
null,true);
mapa.addPopup(popup);
在后者中我收到一个错误:未捕获的类型错误:无法读取 null 的属性“x”
我应该怎么做?