0
ユーザーがベクトルレイヤの1つをクリックしたときに警告メッセージを表示しようとしています。これはIE8を除くすべてのブラウザで正常に動作します。SelectControlはIE8を使用しているOpenLayersでは動作しません
map = new OpenLayers.Map(id, {
theme: null
});
vectorLayer = new OpenLayers.Layer.Vector("Vector Layer");
map.addLayer(vectorLayer);
selectControl = new OpenLayers.Control.SelectFeature(vectorLayer);
vectorLayer.events.on({
'featureselected': onPopupFeatureSelect,
'featureunselected': onPopupFeatureUnselect
});
map.addControl(selectControl);
selectControl.activate();
// ...
function onPopupFeatureSelect(feature) {
alert("OK");
} // <-- Exceptions are thrown here
onPopupFeatureSelect
機能がIE8デバッガは何とかjQueryのコードに落下し、そこに例外をスロー({で)終了するたびに。
選択機能を正しく使用していますか?
更新:地図のどこかをクリックするとクラッシュが発生します。ポップアップ機能とは関係ありません。