Map Switcher widget thumbnails

2047
2
07-27-2012 03:16 PM
KennyHoran
New Contributor III
I'm trying out the 3.0 Map Switcher widget but I can't seem to get the thumbnails to load (I just get gray boxes).  I see some familiar samples in the /assets/images folder but I can't find any reference to them in the source code, nor is there an image setting in MapSwitcherWidget.xml

Where do these thumbnails come from, and how can I set/change them?
Tags (2)
0 Kudos
2 Replies
KennyHoran
New Contributor III
On a hunch I dug through the code a bit and may have found an undocumented feature.  I noticed an "icon" variable associated with a layer and after adding a reference in my config.xml it worked!  Here's an example using the sample from the "Main configuration file" documentation.

<map>
  <basemaps>
    <layer label="Streets" type="tiled" visible="true" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" icon="assets/images/basemap_streets.jpg"/>
    <layer label="Aerial" type="tiled" visible="false" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" icon="assets/images/basemap_imagery.jpg"/>
...
  </basemaps>
</map>


I don't see the icon mentioned in the "Main configuration file" or the "Layer tag" reference pages, so it appears to be missing.
0 Kudos
BjornSvensson
Esri Regular Contributor
3.0 Map Switcher widget ... thumbnails ... how can I set/change them?


If you are using the application builder, it's part of the "edit" options for a layer.  Or as you already found out, the <layer> tag has an icon property.

I don't see the icon mentioned in the "Main configuration file" or the "Layer tag" reference pages, so it appears to be missing.

That is our mistake.  We will add it to the documentation for the <layer> tag.  Thanks for letting us know 🙂
0 Kudos