ol3+ needs size update, fixes #47
This commit is contained in:
parent
018d5e698e
commit
9ffc851abe
@ -193,3 +193,7 @@ function gm_authFailure() {
|
||||
message += '<br><br>' + lang['gmapilink'];
|
||||
showModal(message);
|
||||
};
|
||||
|
||||
function updateSize() {
|
||||
// ignore
|
||||
}
|
||||
|
@ -229,4 +229,6 @@ function expandUrl(url) {
|
||||
return urls;
|
||||
}
|
||||
|
||||
|
||||
function updateSize() {
|
||||
// ignore
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ var loadedAPI = 'openlayers3';
|
||||
|
||||
function init() {
|
||||
|
||||
addCss('https://openlayers.org/en/v4.3.2/css/ol.css', 'ol3css');
|
||||
addCss('https://openlayers.org/en/v4.6.4/css/ol.css', 'ol3css');
|
||||
|
||||
var controls = [
|
||||
new ol.control.Zoom(),
|
||||
@ -409,3 +409,7 @@ function zoomToBounds(b) {
|
||||
var bounds = ol.proj.transformExtent(b, 'EPSG:4326', 'EPSG:900913');
|
||||
map.getView().fit(bounds);
|
||||
}
|
||||
|
||||
function updateSize() {
|
||||
map.updateSize();
|
||||
}
|
||||
|
@ -113,6 +113,7 @@ function toggleMenu(i) {
|
||||
ebutton.style.right = '165px';
|
||||
ebutton.innerHTML = '»';
|
||||
}
|
||||
updateSize();
|
||||
}
|
||||
|
||||
function getXHR() {
|
||||
@ -493,7 +494,7 @@ function loadMapAPI(api) {
|
||||
} else {
|
||||
addScript('js/api_openlayers3.js', 'mapapi');
|
||||
urls.push('//cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList')
|
||||
urls.push('//openlayers.org/en/v4.3.2/build/ol.js');
|
||||
urls.push('//openlayers.org/en/v4.6.4/build/ol.js');
|
||||
}
|
||||
waitAndLoad(mapapi, urls);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user