when zooming out right after drawing a polygon or a line a point appears in the upper left corner, p=jorix, r=me (closes #3196)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11745 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -75,13 +75,14 @@ OpenLayers.Handler.Polygon = OpenLayers.Class(OpenLayers.Handler.Path, {
|
||||
* feature.
|
||||
*/
|
||||
createFeature: function(pixel) {
|
||||
if(!pixel) {
|
||||
pixel = new OpenLayers.Pixel(-50, -50);
|
||||
var geometry;
|
||||
if(pixel) {
|
||||
var lonlat = this.map.getLonLatFromPixel(pixel);
|
||||
geometry = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
|
||||
} else {
|
||||
geometry = new OpenLayers.Geometry.Point();
|
||||
}
|
||||
var lonlat = this.control.map.getLonLatFromPixel(pixel);
|
||||
this.point = new OpenLayers.Feature.Vector(
|
||||
new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat)
|
||||
);
|
||||
this.point = new OpenLayers.Feature.Vector(geometry);
|
||||
this.line = new OpenLayers.Feature.Vector(
|
||||
new OpenLayers.Geometry.LinearRing([this.point.geometry])
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user