I'm looking for a strategy which fires just once, seems Refresh should just be what I need. Yet I haven't been successful how to fire it the first time.

      layer = new OpenLayers.Layer.Vector ("Test", {
                strategies: [new OpenLayers.Strategy.Refresh({ratio: 1})],
                protocol: new OpenLayers.Protocol.API ({
                  element: 'relation',
                  predicate: '/1273572/full',
format: new OpenLayers.Format.OSM ({internalProjection: projMercator, externalProjection: projWGS84})
                }),
                styleMap: styles,
                eventListeners: {
                  "featureselected":
                    function(o) {
                      var a = o.feature.attributes;
                      OpenLayers.Util.getElement('objekt').innerHTML =
                        "<p>" + a.name + "</p>";
                    },
                  scope: this
                }
              });
      map.addLayer(layer);

Any idea what I have to change? Or does anybody have a sample using Refresh?

Wyo

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to