OpenLayers OpenLayers

Changeset 6986

Show
Ignore:
Timestamp:
04/21/08 04:03:46 (7 months ago)
Author:
tschaub
Message:

allow for no strategy and protocol

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/topp/almanac/lib/OpenLayers/Layer/Vector2.js

    r6918 r6986  
    2828    initialize: function(name, options) { 
    2929        OpenLayers.Layer.Vector.prototype.initialize.apply(this, arguments); 
    30         // assumes layer has strategy, protocol, and format 
    31         this.strategy.layer = this; 
    32         this.protocol.format = this.format; 
     30        // assumes if layer has strategy and protocol, then it has a format 
     31        if(this.strategy && this.protocol) { 
     32            this.strategy.layer = this; 
     33            this.protocol.format = this.format; 
     34        } 
    3335    }, 
    3436