Select to view content in your preferred language

Change default basemap with 3.0 mapswitcher widget

4435
11
Jump to solution
06-14-2012 08:57 AM
DanDowning
Regular Contributor
I really like the new gallery/icon view in the basemap portion of the new mapswitcher widget. By default it is showing the topographic basemap. Is it possible to set the default to one of the other basemaps or to one of the Bing basemaps and still use the gallery/icon view?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Dan,

   Sure the method is when you use the addarcgisbasemaps="true" attribute in the map tag it will append available basemaps from the ArcGIS Portal to your map (meaning if you have manually add a particular base map than it will be the first on that is loaded and visible and all the remaining basemaps for the portal will be added after that one).

Example:

    <map initialextent="-14083000 3139000 -10879000 5458000" top="40" zoomslidervisible="false" addarcgisbasemaps="true" wraparound180="true">         <basemaps>             <layer label="Streets" type="tiled" visible="true"  alpha="1" icon="assets/images/basemap_streets.jpg"                         url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>         </basemaps>


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:

View solution in original post

0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus
Dan,

   Sure the method is when you use the addarcgisbasemaps="true" attribute in the map tag it will append available basemaps from the ArcGIS Portal to your map (meaning if you have manually add a particular base map than it will be the first on that is loaded and visible and all the remaining basemaps for the portal will be added after that one).

Example:

    <map initialextent="-14083000 3139000 -10879000 5458000" top="40" zoomslidervisible="false" addarcgisbasemaps="true" wraparound180="true">         <basemaps>             <layer label="Streets" type="tiled" visible="true"  alpha="1" icon="assets/images/basemap_streets.jpg"                         url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>         </basemaps>


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
DanDowning
Regular Contributor
That did it for me. Thanks again Robert!
0 Kudos
DanDowning
Regular Contributor
0 Kudos
JeremyCantor
Deactivated User
This solution does work. However, I would like to have the World Imagery with Labels be the default. Since this is not an actual REST service but rather an ArcGIS Online basemap, Robert's solution does not work. I know that I can set the World Imagery as the default and then add the Labels as an operational layer. However, this means the user would have to turn the Labels off if they changed the basemap to something that already had labels. Is there no way to simply keep the ArcGIS Online basemaps and select one of them to be the default?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeremy,

  Actually the World Imagery with labels is just a combination of two REST Map Services and can be handled using the method I specified (which is the only available option).


    <map wraparound180="true" initialextent="-14083000 3139000 -10879000 5458000" fullextent="-20000000 -20000000 20000000 20000000" top="40" addarcgisbasemaps="true">
        <basemaps>
            <layer label="Imagery with Labels" type="tiled" visible="true"  alpha="1"
                   icon="http://www.arcgis.com/sharing/content/items/716b600dbbac433faa4bec9220c76b3a/info/thumbnail/imagery_with_labels_ne_usa.png"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
            <layer label="Imagery with Labels" type="tiled" visible="true"  alpha="1"
                   icon="http://www.arcgis.com/sharing/content/items/716b600dbbac433faa4bec9220c76b3a/info/thumbnail/imagery_with_labels_ne_usa.png"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer"/>
        </basemaps>


Don't forget to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
JeremyCantor
Deactivated User
Thanks Robert. Forgot to look in the Reference folder. Your help is always appreciated.
0 Kudos
LefterisKoumis
Frequent Contributor
Dan,

   Sure the method is when you use the addarcgisbasemaps="true" attribute in the map tag it will append available basemaps from the ArcGIS Portal to your map (meaning if you have manually add a particular base map than it will be the first on that is loaded and visible and all the remaining basemaps for the portal will be added after that one).

Example:

    <map initialextent="-14083000 3139000 -10879000 5458000" top="40" zoomslidervisible="false" addarcgisbasemaps="true" wraparound180="true">
        <basemaps>
            <layer label="Streets" type="tiled" visible="true"  alpha="1" icon="assets/images/basemap_streets.jpg"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
        </basemaps>


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:


Hello Robert. Did what you recommended:
<map wraparound180="true" initialextent="-13972000 4403000 -13202000 4801000" top="40" zoomslidervisible="false" addarcgisbasemaps="true" >
        <basemaps>
            <layer label="Streets" type="tiled" visible="true"  alpha="1" icon="assets/images/basemap_streets.jpg"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
        </basemaps>
I get the street basemap shown but its tile is missing in the basemap widget... see screenshot. Suggestions?

THank you.[ATTACH=CONFIG]19063[/ATTACH]
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Lefteris,

   Sounds like you need to check that the assets for the streets thumbnail does exist in your project

assets/images/basemap_streets.jpg
0 Kudos
LefterisKoumis
Frequent Contributor
Lefteris,

   Sounds like you need to check that the assets for the streets thumbnail does exist in your project

assets/images/basemap_streets.jpg


Thanks. I was caught not paying attention again!
0 Kudos