我正在使用这个Web应用程序,它使用Javascript和Openlayers等。
我有这段代码一直向我抛出错误
onSelectRow: function(id) {
if (id && id !== lastSel) {
jQuery(this).restoreRow(lastSel);
lastSel = id - 1;
}
subMarkerArray[id - 1] = reportingAvlMap.bringToFront(subMarkerArray[id - 1]);
latLonPoint.transform(fromProjection, reportingAvlMap.map.baseLayer.projection);
reportingAvlMap.map.setCenter(latLonPoint, reportingAvlMap.map.zoom);
subMarkerArray[id - 1].setAnimation(google.maps.Animation.BOUNCE);
setTimeout(function() {
subMarkerArray[id - 1].setAnimation(null);
}, 750);
},
以下一行
var latLonPoint = subMarkerArray[id - 1].attributes.lonlat.clone();
给我这个错误:
Uncaught TypeError: Cannot read property 'clone' of undefined
以下一行
subMarkerArray[id - 1].setAnimation(google.maps.Animation.BOUNCE);
给我这个错误:Uncaught TypeError: undefined is not a function
有人能指点我正确的方向来帮助我吗?