Select to view content in your preferred language

Spatial reference must match map's spatial reference

6916
10
04-23-2013 08:35 PM
ReneRubalcava
Esri Frequent Contributor
Using AGS SL API 3.1
I'm at a loss on this one.
My map has a TileMapServiceLayer, couple of Dynamic Layers and a couple of FeatureLayers.
The FeatureLayers URL sources are set before the map loads
All layers are from the same server and have the same spatial reference.
I set the URLs of the FeatureLayers via a resource, and load Dynamic layers when the app starts.
I manually set my extent to be safe.
<esri:Map x:Name="Map" Background="{StaticResource BaseColor}">
    <esri:Map.Extent>
        <esri:Envelope XMin="number" YMin="number" XMax="number" YMax="number" >
            <esri:Envelope.SpatialReference>
                <esri:SpatialReference WKID="102696"/>
            </esri:Envelope.SpatialReference>
        </esri:Envelope>
    </esri:Map.Extent>
    ...


Even if I just slightly pan the map, I get the attached error.
[ATTACH=CONFIG]23734[/ATTACH]

I'm lost on how to handle this. It says to clear the map layers. What?

If I could even figure out where to handle the error, I'd attempt to catch it and see if I could ignore it.

I stripped everything down to just a single TiledMapServiceLayer and the error still persists.

Any help would be greatly appreciated, thanks.
0 Kudos
10 Replies
AndreyKolko
Deactivated User

Good afternoon.

Add my two cents worth - hope it will help. With such a problem I encountered when translating my application with the UserCS to the CS with WKID=102100 (Web Mercator). Long to understand, make a new application with my old code - nothing helped. It turned out everything is simple - in application present an OverviewMap in UserCS. After the change the layer of OverviewMap with WKID=102100 error no longer occur. In a standard template standard.zip also present OverviewMap and by default it is present World_Street_Map in coordinate system WKID=102100. I think it may cause an error, if the work map in another coordinate system.

0 Kudos