最新の LeafletJS ライブラリを使用して、マップ上に特定の popop オプションを含むポップアップを表示しています。
Firefox と Chrome では問題なく動作しますが、IE8 では失敗し、次のエラー メッセージが表示されます。
無効な引数。leaflet.js、6 行目、文字 14452
つまり:
i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height=""
問題は明らかにpopupOptions 宣言にあるようです-コメントを外すと、IE8ではjsエラーは発生しませんが、もちろんオプションも適用されません。
それで、構文のどこが間違っているのだろうか?
function onEachFeature(feature, layer) {
var popupContent = '...';
if (feature.properties && feature.properties.popupContent) {
popupContent += feature.properties.popupContent;
}
var popupOptions =
{
'minWidth': '491px',
'maxWidth': '491px',
'closeButton': false
}
layer.bindPopup(popupContent, popupOptions);
}