Select to view content in your preferred language

Help please: Bing map does not display together with Esri layers

822
3
07-02-2010 12:21 PM
BinBin
by
Emerging Contributor
I have two esri layers and one bing tilelayer in my Silverlight app, the two esri layers can display without bing layer, and the bing layer can display without the two esri layers, but if put them together, nothing will show.
Please help.

Below is my source code.

<esri:Map x:Name="MyMap"  >

<esri:Map.Extent>
<esri:Envelope  XMin="2471999.70000267" YMin="521998.699899673" XMax="2490000.30005074" YMax="534000.300050735">
</esri:Envelope>
</esri:Map.Extent>
           
<esri:Map.Layers >
               
<esri:ArcGISImageServiceLayer ID="Avista_2009"
                    Url="http://xxx.xxx.118.202/ArcGIS/rest/services/Avista_09/ImageServer"
                                          ImageFormat="JPG" Visible="True" />

<esri:ArcGISDynamicMapServiceLayer ID="facility"
                    Url="http://xxx.xxx.118.202/ArcGIS/rest/services/WSU_Facilities_API/MapServer"/>

<bing:TileLayer ID="bing" ServerType="Production" Token="Auw1cAvI7a0mgKhB3D_PpNRWpdU-zLF2191WF2H0mITWj_HiSGVGA9qme-vI7ZlB" />
               
               
</esri:Map.Layers>
</esri:Map>
0 Kudos
3 Replies
DominiqueBroux
Esri Frequent Contributor
Very likely you run into a spatial reference issue.

You can't display together tiled layers or image layers with different spatial references. (it's ok for dynamic or feature layers because the projection is done on the fly by the server).

Bing maps are using web mercator spatial reference (102100), if your image server is not using this one, you won't be able to display both layers.
0 Kudos
dotMorten_esri
Esri Notable Contributor
Since the first layer in  your map defines the spatial reference, I'm guessing that the ImageService's default spatial reference is not the same as the Bing Layer's. Tiled layers does not reproject so this wont work.
You can force the spatial reference to match  Bing, and the two other layers should be capable of reprojecting to that projection (since they are both dynamic):
(you might have to change the x/y values to work with this spatial reference)
 
<esri:Map.Extent>
<esri:Envelope XMin="2471999.70000267" YMin="521998.699899673" XMax="2490000.30005074" YMax="534000.300050735">
 <esri:Envelope.SpatialReference><esri:SpatialReference WKID="102100" /><esri:Envelope.SpatialReference>
</esri:Envelope>
</esri:Map.Extent>

0 Kudos
BinBin
by
Emerging Contributor
Thanks guys, problem solved
0 Kudos