LocalArcGISDynamicMapServiceLayer lyr = new LocalArcGISDynamicMapServiceLayer(PATH_TO_MAP_PACK); lyr.Initialize(); map.Layers.Add(lyr); map.WrapAround = true;
Hi,It's better to have the Map itself control the initialization of the layer rather than calling the Initialize() method directly. For example, try something along the following lines (assumes your Map's x:Name property is "MapControl"):MapControl.WrapAround = true;//Add a WGS84 tiled service:ArcGISTiledMapServiceLayer arcGISTiledMapServiceLayer = new ArcGISTiledMapServiceLayer() {Url = "http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer",ID="WorldTopoMap"};MapControl.Layers.Add(arcGISTiledMapServiceLayer);//Add a WGS84 Map Package asynchronously:LocalMapService.GetServiceAsync(@PATH_TO_MAP_PACK, (localMapService) =>{LocalArcGISDynamicMapServiceLayer localArcGISDynamicMapServiceLayer = new LocalArcGISDynamicMapServiceLayer(){Path = localMapService.Path,ID = "TheLayerID",ImageFormat = ArcGISDynamicMapServiceLayer.RestImageFormat.PNG32,PanBuffer = PanBufferSize.Medium};MapControl.Layers.Add(localArcGISDynamicMapServiceLayer);});I'm interested to hear your results. If you're still not seeing the WrapAround property work as you expect - perhaps you could post a small, shareable, sample of your data that I can test?CheersMike
I guess I'll try the Interactivity stuff next, but your response doesn't address how to find the max extent of the map pack dynamically, just how to set the values.
Re Reference/Schema:Sorry - you shouldn't need xmlns:esriBehaviors="clr-namespace:ESRI.ArcGIS.Client.Behaviors;assembly=ESRI.ArcGIS.Client.Behaviors" - just xmlns:esri="http://schemas.esri.com/arcgis/client/2009" should work.
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.