Select to view content in your preferred language

map area cut off on full extent

4322
13
12-10-2010 02:51 PM
YingLin
Emerging Contributor
I divided the root layout to several grid. one grid has the map. I set the full extent on initialize, but the map still gets cut off on both side (width is more than twice the height). depends on different resolution, the lower the resolution, the more area cut off.
0 Kudos
13 Replies
JenniferNery
Esri Regular Contributor
Can you check the container for Margin and Padding?
0 Kudos
YingLin
Emerging Contributor
here is my code
<Grid Grid.Column="1" Margin="6,8,12,12" Effect="{StaticResource dropShadow}">
                <Rectangle RadiusX="12" RadiusY="12" Fill="#4e7ba3" />
                <Rectangle RadiusX="9" RadiusY="9" Fill="White" Margin="3"></Rectangle>
                <Border BorderThickness="1" BorderBrush="#ffffff" CornerRadius="10">
                        <esri:Map x:Name="Map" Background="White" ExtentChanged="MyMap_ExtentChanged" MouseClick="QueryPoint_MouseClick" MouseMove="Map_MouseMove" Margin="15">
                            <esri:ArcGISTiledMapServiceLayer Visible="False" ID="Ortho Photo" Url="http://chgisservice/ArcGIS/rest/services/live/ortho_2008/MapServer/"  />
                            <esri:ArcGISDynamicMapServiceLayer ID="Property Layers" Visible="True" DisableClientCaching="True"
          Url="http://chgisservice/ArcGIS/rest/services/live/property/MapServer" Initialized="ArcGISDynamicMapServiceLayer_Initialized"   />
                            <esri:ArcGISDynamicMapServiceLayer ID="Zoning Layers" Visible="False" DisableClientCaching="True" Url="http://chgisservice/ArcGIS/rest/services/live/zoning/MapServer"></esri:ArcGISDynamicMapServiceLayer>
                       
                        <esri:GraphicsLayer  ID="MyGraphicsLayer">
                            </esri:GraphicsLayer>
                      
                    </esri:Map>

                </Border>

<!--more stuff here, such as mouse coordinates, scalebars, navigator -->
</grid>
0 Kudos
YingLin
Emerging Contributor
here is the screenshot. you can see the map is cut off on both side. supposed to be full extend.
0 Kudos
dotMorten_esri
Esri Notable Contributor
If you set it to the full extent that you get from the service (ie layer.FullExtent), note that the extent the server reports might not be correct if your data changes. Sometimes a REST cache refresh or republish of the service is required.
Your screenshot doesn't really show what you mean by "cut off" though. There is some white area all around the map. Is this what you mean? This is caused by the 15px margin you have on the map.

As a side note you should avoid putting DropShadow on a container of the map. It really hurts performance when zooming and panning.
The best thing to do is have two separate elements for this. One for dropshadow and one for map.
Ie.
 
<Grid>
   <Border Effect="{StaticResource dropShadow}" />
   <Grid>
      <esri:Map />
   </Grid>
</Grid>
0 Kudos
YingLin
Emerging Contributor
Thanks for the suggestion on the dropshadow effects. will try that.

The problem is that there are few blocks cut off on both sides (east and west side). the lower the screen resolution, more blocks cut off. about 1km of area on both sides not displayed on the current resolution. on a wide screen monitor, less area cut off. the map service has been recreated, refreshed many times since the app was built. The problem is always there.

feels like the map is loaded into the parent grid rather than grid.column=1
0 Kudos
YingLin
Emerging Contributor
here is another screenshot with the overview map. The map is on fullextent right now. Not sure how overview map works but the red box covers the area available on the map. you can see there are few blocks on both side of the map are outside of the red box and they are not cut off on the map.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
If your ArcGISTiledMapServiceLayer  and your ArcGISDynamicMapServiceLayers are not using the same spatial reference, the full extent of the map is defined by the sole ArcGISTiledMapServiceLayer.
What is the full extent of this service?

I suggest you to test after removing the ArcGISTiledMapServiceLayer  in order to check if the result is better without this layer.
0 Kudos
YingLin
Emerging Contributor
We just found out that too. it was because of the orthophoto which is a tiledmapservicelayer. however the ortho has the correct spatial reference. Everything seems to be fine when opening the ortho in ArcMap or ArcCatalog. But when loaded it to the map service, the extent cut off.
What could be the problem with the ortho photo?
0 Kudos
YingLin
Emerging Contributor
If the ortho is DynamicMapservicelayer, looks fine. once it is changed to cached map (tiledmapservicelayer), the problem starts.
0 Kudos