Skip to content

Commit d358cd0

Browse files
committed
Merge pull request openlayers#1247 from MrMasochism/master
Added a fix for geometry collections which cross the 180
2 parents 6e11971 + e71e152 commit d358cd0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/OpenLayers/Renderer/Canvas.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ OpenLayers.Renderer.Canvas = OpenLayers.Class(OpenLayers.Renderer, {
207207
(className == "OpenLayers.Geometry.MultiPoint") ||
208208
(className == "OpenLayers.Geometry.MultiLineString") ||
209209
(className == "OpenLayers.Geometry.MultiPolygon")) {
210+
var worldBounds = (this.map.baseLayer && this.map.baseLayer.wrapDateLine) && this.map.getMaxExtent();
210211
for (var i = 0; i < geometry.components.length; i++) {
212+
this.calculateFeatureDx(geometry.components[i].getBounds(), worldBounds);
211213
this.drawGeometry(geometry.components[i], style, featureId);
212214
}
213215
return;

0 commit comments

Comments
 (0)