OpenLayers OpenLayers

Changeset 1078

Show
Ignore:
Timestamp:
08/03/06 17:28:02 (2 years ago)
Author:
sderle
Message:

Make OpenLayers.Marker subclassable.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/euzuro/layerswitcher/lib/OpenLayers/Marker.js

    r1039 r1078  
    2828    */ 
    2929    initialize: function(lonlat, icon) { 
    30         this.lonlat = lonlat; 
    31         this.icon = (icon) ? icon : OpenLayers.Marker.defaultIcon(); 
    32  
    33         this.events = new OpenLayers.Events(this, this.icon.imageDiv, null); 
     30        if (arguments.length > 1) { 
     31            this.lonlat = lonlat; 
     32            this.icon = (icon) ? icon : OpenLayers.Marker.defaultIcon(); 
     33            this.events = new OpenLayers.Events(this, this.icon.imageDiv, null); 
     34        } 
    3435    }, 
    3536