Select to view content in your preferred language

Overview Map not working with BingLayers in FlexViewer

2594
10
07-29-2010 07:23 AM
ScottBeaumont
Emerging Contributor
In the beta 2.0 FlexViewer, I've changed the config.xml file to use bing layers instead of the default tiled layers from ArcGISOnlie.  Everything works great, except for the overview map.  When I use the Bing layers, the overview map is blank.  Any thoughts?  I've posted the map config section below where I changed the basemap layers to bing.

<map initialextent="-14083000 3139000 -10879000 5458000">
        <basemaps>
            <mapservice label="Streets" type="bing" visible="false"  alpha="1"
                 key="Al0VE_jsmagxk4LFghXGlK5JSHfC0tk-eHRubZv_eMYm6wzgQaStYks8g-wWcgk3"
                 style="road"/>
            <mapservice label="Aerial" type="bing" visible="false" alpha="1"
                   key="Al0VE_jsmagxk4LFghXGlK5JSHfC0tk-eHRubZv_eMYm6wzgQaStYks8g-wWcgk3"
                   style="aerial"/>
            <mapservice label="Hybrid" type="bing" visible="false" alpha="1"
              key="Al0VE_jsmagxk4LFghXGlK5JSHfC0tk-eHRubZv_eMYm6wzgQaStYks8g-wWcgk3"
              style="aerialWithLabels"/>           
        </basemaps>
        <operationallayers>
            <layer label="Boundaries and Places" type="tiled" visible="false"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer"/>
            <layer label="Fires" type="feature" visible="false" alpha="1"
                   info="widgets/InfoTemplates/SimpleInfoWinWidget.swf"
                   infoconfig="widgets/InfoTemplates/IWT_Fires.xml"
                   url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/>
        </operationallayers>
    </map>
Tags (2)
0 Kudos
10 Replies
RobertScheitlin__GISP
MVP Emeritus
Scott,

   Have you changed your OverviewMapWidget.xml?
0 Kudos
ScottBeaumont
Emerging Contributor
No, I have not.  I was under the impression that it would use the same layers that the base map uses by default.  Here is the OverViewMapWidget.xml:

<?xml version="1.0" ?>
<configuration>
    <!-- possible values for initialstate: open or closed (default) -->
    <initialstate>closed</initialstate>
    <!-- by default it will use the same basemap as current main map,
         you can hardcode as below if you wish -->
    <!-- <mapservice 
            type="tiled" 
            mode="dynamic" 
            url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
    -->
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Scott,

   You don't have to I was just wondering if you had. I will test this bing maps on my end and let you know.
0 Kudos
ScottBeaumont
Emerging Contributor
Awesome... thanks for the help.
0 Kudos
MehulChoksey
Esri Contributor
If config file for overview map does not specify layer, then overview map should have same layer as base map. Thanks for reporting this bug.  We have filed issue in our system
0 Kudos
SarthakDatt
Frequent Contributor
Hey Scott,

Can you try adding culture property to your bing map service tag.

<mapservice label="Streets" type="bing" visible="false"  alpha="1"
                 key="Al0VE_jsmagxk4LFghXGlK5JSHfC0tk-eHRubZv_eMYm6wzgQaStYks8g-Wcgk3"
                 style="road" culture="en-US"/>


Right now, the overview component looks for both style and culture, hence it shows blank in your case. I would put in a fix for this.

--Sarthak Datt
ESRI Flex Team
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Scott,

   I came up this the same thing as Sarthak. My fix was to change the OverviewMapComponent.mxml's bing case to the below.

case "bing":
         var veTiledLayer:VETiledLayer = new VETiledLayer();
         veTiledLayer.id         = label;
         veTiledLayer.key        = bingMapKey;
         veTiledLayer.visible    = visible;
         veTiledLayer.alpha      = alpha;
         veTiledLayer.mapStyle = style || "aerial";
         veTiledLayer.culture = culture || "en-US";
         ovMap.addLayer(veTiledLayer);
                                    break;
0 Kudos
ScottBeaumont
Emerging Contributor
Thanks a lot for the timely help.  I've made the change and things are working nicely.
0 Kudos
KirstynAlex
Occasional Contributor
Rscheitlin, where exactly do you put that code to make the bing map show up in the overview widget?
0 Kudos