OpenLayers OpenLayers

Changeset 1707

Show
Ignore:
Timestamp:
10/20/06 11:40:41 (2 years ago)
Author:
crschmidt
Message:

Paul requests I bring vector drawing back.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/crschmidt/vector/examples/vector.html

    r1698 r1707  
    6565            
    6666            
    67              
     67        map.events.register("mousedown", map, function(e) { 
     68          if (click) { 
     69             
     70            layer.addFeature(new OpenLayers.Vector.Line(click, new OpenLayers.Vector.Point(this.getLonLatFromPixel(e.xy)))); 
     71            click = null; 
     72          }  
     73          else {  
     74           click = new OpenLayers.Vector.Point(this.getLonLatFromPixel(e.xy)); 
     75         } 
     76       }); 
    6877        } 
    6978