Select to view content in your preferred language

Pan stoped working

1730
10
04-30-2010 01:49 PM
BrianGustafson
Occasional Contributor
In my map I can nolonger pan around or hold shift and zoom in.  I can however zoom in using the mouse wheel or prgramatically move the map.  Any ideas why this went away? 

<esri:Map x:Name="MyMap" MinimumResolution="0.0000000001" Canvas.Left="550" Canvas.Top="20" Width="920" Height="800" Extent="-115.1449, 33.2983, -95.02816, 43.163" IsLogoVisible="False">
                            <esri:Map.Layers>
                                <esri:ArcGISTiledMapServiceLayer ID="BaseMapLayer"
                                    Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer"/>
                                <esri:ArcGISDynamicMapServiceLayer ID="MyServiceLayer"
                                    Url="http://arcgisp/ArcGIS/rest/services/Tri-State_GIS_Viewer/MapServer"/>
                            </esri:Map.Layers>
                        </esri:Map>
0 Kudos
10 Replies
DominiqueBroux
Esri Frequent Contributor
You can decrease the MinimumResolution parameter but when the resolution is too low you'll get no data coming from the TiledMapService.

/Dominique
0 Kudos
BrianGustafson
Occasional Contributor
I am not having trouble with the resolution, that is all working fine.  The issue that I am having is that when I click and drag on the map nothing happens.
0 Kudos
dotMorten_esri
Esri Notable Contributor
Did you put some element on top of the map that stretches the entire with and prevents the mousedrag from getting to the map? For instance if you just put a textblock in the grid above the map, it can block these events, even though the text is only at the center. If that's the case, either set IsHitTestVisible=false on that element, and/or change the alignment from the default "Stretch" to something else.
0 Kudos
BrianGustafson
Occasional Contributor
There is nothing covering the map.  I have turned everything else off but the map and it still is not working.  I still can roll the mouse to zoom in and zoom out, but I cannot drag the map or even get the click event to fire when I am on the map.  Mouse enter and mouse leave events are working.  The map is in a tab control and I have set all of the other tabs hit testable to false and it does not work.  After I roll the mouse I can press the arrow keys and move the map but if I press the left mouse button down I can no longer use the arrow keys.  currently there is no mouse down event on the map.
0 Kudos
dotMorten_esri
Esri Notable Contributor
Is the map within a ScrollViewer control? ScrollViewer intercepts the mouseevents preventing the map from receiving these events.
0 Kudos
BrianGustafson
Occasional Contributor
That was it.

Thanks.
0 Kudos
VictorStelmasuk
New Contributor
i'm having the same issue here, but my map is the only element on stage. I started a new project to test only with the map and it's behaving exactly like bmgustafson described. What else could be causing this??
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Do you mean that you can't pan with the template application without any modification?

Is it working with the online samples (e.g http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Map) ?
0 Kudos
PLadd
by
Frequent Contributor
Has anybody figured out a way to use both the scrollviewer and panning.  I'm guessing api 2.0 won't be fixing this problem.  I'm using beta and I can't pan with scrollviewer above the LayoutRoot grid.
0 Kudos