[OpenLayers-Dev] Modifiying Vector layer protocol URL and forcing a
layer refresh
joe.tito
joetito1 at gmail.com
Mon Aug 22 11:19:43 EDT 2011
I have created a vector layer with an auto refreshing georss feed and I'm
trying to figure out how to force the layer to refresh after I change the
URL of the protocol. Whenever a user moves the map, I'm trying to pass the
current extent of the map to my PHP page that returns my GeoRSS feed.
Here is the code I have used to create the vector layer:
*markers = new OpenLayers.Layer.Vector("Markers", {
strategies: [new OpenLayers.Strategy.Fixed(),
new OpenLayers.Strategy.Refresh({interval:
refreshTime}),
new OpenLayers.Strategy.Cluster({distance: 15, threshold: 1})],
protocol: new OpenLayers.Protocol.HTTP({
url: "http://mysite.com/maps/georss.php",
format: new OpenLayers.Format.GeoRSS()
}),
styleMap: new OpenLayers.StyleMap({"default": style})
});*
Here is how I am changing the protocol url:
*markers.protocol.url = "http://zoobl.com/maps/georss.php?pointCount=10";*
I just can't seem to figure out the proper way to force my vector layer to
refresh on command instead of waiting for the next refresh period to hit.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Modifiying-Vector-layer-protocol-URL-and-forcing-a-layer-refresh-tp6711991p6711991.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.
More information about the Dev
mailing list