Changeset 6986


Ignore:
Timestamp:
Apr 21, 2008 1:03:46 AM (8 years ago)
Author:
tschaub
Message:

allow for no strategy and protocol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.