Select to view content in your preferred language

How to get user's current map extent?

456
0
05-16-2013 11:49 AM
JennB
by
Regular Contributor
Greetings,

I am trying to get the user's current map extent but everything I've tried so far has been along the lines of a catastrophic failure (I'm new to C#/Silverlight/XAML) :(. I think part of the problem that I'm running into is that I don't know enough about it to deviate from some of the examples given.

I'm aware that this exists but the problem is that I'm using the ESRI Silverlight Viewer and I'm trying to get this map extent functionality in a different widget (not where the main map layers are defined).

I see a lot of this (excerpt from above link), or variations of this definition in a lot of examples but it doesn't particularly help with what I'm doing since, as I said, the layers are added in an AppConfig.xml file I have:

<esri:Map x:Name="MyMap" WrapAround="True" ExtentChanged="MyMap_ExtentChanged" ExtentChanging="MyMap_ExtentChanged">
            <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" 
                Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
</esri:Map>


Anyway, long story short, I'm trying to figure out how to get the map extents of the user's current zoom level and I've been stuck for a few days. Any help? 😞

Thanks in advance,
Jenn
0 Kudos
0 Replies