Does anybody know why icons in this example from arcgis api javascript page don't show?
Map navigation tools | ArcGIS API for JavaScript 3.20
Is it an issue about links with dependencies?
How can I reference dijit icons on my application?
Thanks in advance
I have reported the 404 error to esri using their page not found "Report a Problem" link.
You're right, Thejus. I didn´t notice the live example does reference the icons in the right way. I had created a html document with the same code and it didn't import the icons either. It is a problem whith the relative link to the current location of the example page: "Navigation toolbar ". I don't know why, but I had imagined the icons woud be taken from the dojo toolkit and that got me some confusion.
Thanks, anyway.
I think it just the sandbox which is failing to show the images. If you look at the Live version its working.
If you look at the sample, you will see that all the icons are setup through css and the iconClass are defined for each button in HTML like below.
<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"><</SPAN>div</SPAN> <SPAN class="attr-name token">data-dojo-type</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>dijit/form/Button<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">id</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>zoomin<SPAN class="punctuation token">"</SPAN></SPAN> <SPAN class="attr-name token">data-dojo-props</SPAN><SPAN class="attr-value token"><SPAN class="punctuation token">=</SPAN><SPAN class="punctuation token">"</SPAN>iconClass:<SPAN class="punctuation token">'</SPAN>zoominIcon<SPAN class="punctuation token">'</SPAN><SPAN class="punctuation token">"</SPAN></SPAN><SPAN class="punctuation token">></SPAN></SPAN>Zoom In<SPAN class="token tag"><SPAN class="token tag"><SPAN class="punctuation token"></</SPAN>div</SPAN><SPAN class="punctuation token">></SPAN></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>
If you want to change the icon, you can define you own Icon style css and update the iconClass in the properties.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.