I am using the open layer and I am trying to create an information overlay layer. I am using my own WMS server, so for this layer, the server always sends an image with the information in it. My problem is that when I pan the map, my "information" layer also ends the pan, once the panning ends, the layer gets refreshed and the text is displayed in the correct position. This special layer (WMS), is there any way to achieve this?
I tried with an external diva but did not succeed, panning was still there.
Thank you!
Edit: So here's what I came up with. It works perfectly, thanks for the consideration
& lt; Script type = "text / javascript" & gt; ////////////////////////////////////// Use of a fidelity with the use / //////////////////////////////////////////////// //////////////////////////////////////////////// //////////////////////////////////////////////// ///// Refresh ({interval: 10000, force: true, refresh: function () {if (it.lear) {this.layer.attribution = "Loading data ..."; Load New features var layer = this.layer; $ .ajax ({url: "myURL", success: function (data) {layer.attribution = data; map.getControlsByClass ("open layers.control attribution") [0]. UpdateAttribution ();}, global: wrong});}}}); Var Notificationier = New OpenLayer Layer ("Without love plan", {Attribution: "Loading data ..."}); InformationLayerRefreshStrategy.setLayer (infoLayer); InformationLayerRefreshStrategy.activate (); & Lt; / Script & gt; My conclusion: Use a separate layer that contains only attribution values. Please inquire for a different resource that you can configure to use JSON. In the Refresh Swartzie, update the attribution for the layer with only the resulting data, and styled the Generated Attribution Developer to display it in the right place in relation to its map.
Comments
Post a Comment