javascript - Output variable value for attribution in OpenLayers -


i display string (let's 'blabla') on openlayers map such string's position stays constant relative viewfram - i.e. not move when user zooms (similar control.panzoom() controls).

control.attribution() this. works 'static' data such as

'attribution': "blabla" 

however, display strings value changes (let's variable named var, initial value var='blabla', value changed 'blu' , 'pla' depending on user interaction).

i tried using

'attribution': "${var}" 

but outputs ${var} instead of 'blabla'.

would know either 1) how output variables attribution option or 2) how place variables on map such stays in same position relative viewframe?

thank you

try use directly variable this:

var myvar = 'blabla';  // code , then...  'attribution': myvar 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -