Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// this scripts is a container for fixes to OpenLayers
// remove it when fixed in openlayers

/**
* Patch for this issue: http://osgeo-org.1560.x6.nabble.com/WFS-and-IE-11-td5090636.html
*/
var originalWriteFunction = OpenLayers.Format.XML.prototype.write;

var patchedWriteFunction = function()
{
var child = originalWriteFunction.apply( this, arguments );

// NOTE: Remove the rogue namespaces as one block of text.
// The second fragment "NS1:" is too small on its own and could cause valid text (in, say, ogc:Literal elements) to be erroneously removed.
child = child.replace(new RegExp('xmlns:NS\\d+="" NS\\d+:', 'g'), '');

return child;
};

OpenLayers.Format.XML.prototype.write = patchedWriteFunction;


/**
* Patch for this issue: https://github.com/geosolutions-it/MapStore/issues/467
*/
var originalServerResolutionFunction = OpenLayers.Layer.Grid.prototype.getServerResolution;

var patchedServerResolutionFunction = function(resolution) {
var originalResolution = resolution || this.map.getResolution();
resolution = originalServerResolutionFunction.apply(this, arguments);

if(Math.abs(1- originalResolution/resolution) < 0.01) {
resolution = originalResolution;
}
return resolution;
};

OpenLayers.Layer.Grid.prototype.getServerResolution = patchedServerResolutionFunction;
2 changes: 1 addition & 1 deletion mapcomposer/buildjs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ include =
OpenLayers/Format/TMSCapabilities.js
OpenLayers/WPSProcess.js
OpenLayers/Format/WPSExecuteRequest.js
OpenLayers/IE11_WFSfix.js
OpenLayers/OLFixes.js
OpenLayers/TimeAgent.js
OpenLayers/TimeAgent/WMS.js
OpenLayers/OpenLayers-Ext-Utils.js
Expand Down