I have the following object.
ou.map : {
settings : {
},
basePath : './path/';
marker_setting : {
img : this.basePath + 'image.png';
},
fun : function() {
alert ( this.maker_setting.img );
//alert ( this.basePath + this.maker_setting.img ); Right now, I am using this where this.maker_setting.img is simply 'image.png'
}
}
Here, value of ou.map.marker_setting.img
comes out to be undefinedimage.png
, but I want that to be ./path/image.png
. How can I do that?
Edit
I am open to change the complete approach as well. All I want is, one namespace having marker_setting and basePath and one main method which can use property in marker_setting.
Also, I tried all these
img : this.basePath + 'image.png';
img : basePath + 'image.png';
img : ou.map.basePath + 'image.png';
None, of these gave desired output. Let me know if any other info is required.