Good morning everybody,
I am trying to add some text to the ESRI attribution in the bottom right (see attachment).
How would I access this element? When I inspect it, it doesn't have an id, it only has a class.
Thanks!
Tim
Tim,
Sure this is pretty straight forward:
Require: 'dojo/dom-construct'
var myDiv = domConstruct.toDom("<div style='right:5px;bottom:22px;position:absolute;text-align:right;z-index: 9;'>hello world</div>"); domConstruct.place(myDiv, "map");
Do you have an example on how to add a dom element above it? I really like this idea.
The Attribution dijit is designed to display the attribution text in a single line and truncate it at a certain string limit until the user clicks the dijit, for it show more text. You would have to do css manipulation to attempt to override the single line nature of the dijit. You would probably be better off adding your own dom element above it.
Thanks Robert I didn't even think about that.
How would I add some custom text above "Earthstar Geographics"?
The map has a attribution property that returns the Attribution dijit
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.