[OpenLayers-Dev] Help with where to look for a bug - drawFeatures controls not working at ONE zoom level.

Phil Scadden p.scadden at gns.cri.nz
Wed Apr 25 23:10:55 EDT 2012


Looking further, I see that the layer for drawing on is create with this 
code in RegularPolygon.js

activate: function() {
var activated = false;
if(OpenLayers.Handler.Drag.prototype.activate.apply(this, arguments)) {
// create temporary vector layer for rendering geometry sketch
var options = OpenLayers.Util.extend({
displayInLayerSwitcher: false,
// indicate that the temp vector layer will never be out of range
// without this, resolution properties must be specified at the
// map-level for this temporary layer to init its resolutions
// correctly
calculateInRange: OpenLayers.Function.True,
wrapDateLine: this.citeCompliant
}, this.layerOptions);
this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, options);
this.map.addLayer(this.layer);
activated = true;
}
return activated;
},

It is picking up wrapdateline from citeCompliant.

Now if I set citeCompliant to true, then you cant draw a polygon that 
crosses the 180 - so it is set to false, and I have special code 
handling the crossing. This looks like a catch-22.

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Dev mailing list