POST
|
Hi Peter, One simple way (recently introduced in 10.2.4) is to make use of MapView.GraphicOverlay instead of GraphicLayers. According to the documentation, GraphicOverlay will always appear above your MapView.Map.Layers. In terms of API, GraphicOverlay is almost exactly the same as GraphicLayer Another way is to make use of the Move/MoveItem/Insert methods to reorder your layers, or insert new layers at a specified index LayerCollection Class
... View more
10-16-2014
08:09 PM
|
4
|
0
|
636
|
POST
|
Not done this myself, and assuming you are using the Runtime SDK for .NET 10.2.4: Each GraphicLayer has a Labelling Property GraphicsLayer.Labeling Property Within this LabellingProperty you are expected to add AttributeLabelClasses LabelProperties Class , Within the AttributeLabelClass, you can specify the label placement and other properties of the label. AttributeLabelClass Class I am assuming that it is the TextExpression property that you will use to indicate that the "Id" attribute should be used for the label's text content. Sample lifted from the ArcGIS Runtime docs // create a new TextSymbol for displaying graphic labels var labelSym = new Esri.ArcGISRuntime.Symbology.TextSymbol(); // define the font: Arial, 10pt, non-italic, non-underlined, bold labelSym.Font = new Esri.ArcGISRuntime.Symbology.SymbolFont ("Arial", 10.0, Esri.ArcGISRuntime.Symbology.SymbolFontStyle.Normal, Esri.ArcGISRuntime.Symbology.SymbolTextDecoration.None, Esri.ArcGISRuntime.Symbology.SymbolFontWeight.Bold); // define the font color and halo (border) labelSym.Color = Colors.Blue; labelSym.BorderLineColor = Colors.LightBlue; labelSym.BorderLineSize = 1; // create a new LabelClass var labelClass = new Esri.ArcGISRuntime.Layers.AttributeLabelClass(); // assign the TextSymbol labelClass.Symbol = labelSym; // provide a text expression: // attribute names in [brackets] // hard-coded text in "quotes" // CONCAT to concatenate // NEWLINE for line break labelClass.TextExpression = "[Name] CONCAT NEWLINE CONCAT [Rating] CONCAT \" stars\""; // add the new LabelClass to the GraphicsLayer's collection graphicsLayer.Labeling.LabelClasses.Add(labelClass); // enable labeling graphicsLayer.Labeling.IsEnabled = true;
... View more
10-15-2014
07:44 PM
|
0
|
1
|
753
|
POST
|
I've been playing with displaying FeatureLayers from a local .geodatabase file. I've organised some of these layers within a GroupLayer. For example: Roads (GroupLayer) Motorway (FeatureLayer from local geodatabase) Trunk (FeatureLayer from local geodatabase) Primary (FeatureLayer from local geodatabase) Secondary (FeatureLayer from local geodatabase) ... Each of these FeatureLayers is labelled with the street name. Observation 1) The label do not respect the visibility of the parent group layer: If I set the visibility of the parent grouplayer (Roads) to false, the features get hidden but the labels will still be displayed. Is this a bug? Observation 2) The order in which I set visibility of a feature layer and enable/disable the labels is important. For example, if I set the visibility of the primary road layer to true and enable the labelling, depending on the order in which I perform this, labels may not appear until the map is panned. Is this a bug?
... View more
10-15-2014
07:28 PM
|
0
|
2
|
4117
|
POST
|
Thanks, is there any documentation out there which describes what keys / gestures will trigger rotation and zooming when the ZoomOptions and RotationOptions are enabled?
... View more
10-14-2014
06:55 PM
|
0
|
0
|
343
|
POST
|
In 10.2.3, Right click to zoom is enabled by default. Middle click allowed me to rotate the map. In 10.2.4, even after enabling Rotation and Zooming via the InteractionOptions, I am no longer able to perform either action. Is there any way to re-enable the 10.2.3 behaviours? XAML InteractionOptions Snippet <esri:MapView.InteractionOptions> <esri:InteractionOptions> <esri:InteractionOptions.ZoomOptions> <esri:ZoomOptions IsEnabled="True" IsDoubleTappedEnabled="True" IsZoomBoxEnabled="False" IsMouseWheelEnabled="True" IsPinchEnabled="True" IsTwoFingerTapEnabled="True" IsKeyboardEnabled="False" /> </esri:InteractionOptions.ZoomOptions> <esri:InteractionOptions.RotationOptions > <esri:RotationOptions IsEnabled="True" /> </esri:InteractionOptions.RotationOptions> <esri:InteractionOptions.PanOptions> <esri:PanOptions IsEnabled="True" IsDragEnabled="True" IsFlickEnabled="True" IsKeyboardEnabled="True" /> </esri:InteractionOptions.PanOptions> </esri:InteractionOptions> </esri:MapView.InteractionOptions>
... View more
10-14-2014
01:25 AM
|
0
|
2
|
3237
|
POST
|
With reference to Add graphics and text—ArcGIS Runtime SDK for .NET | ArcGIS for Developers Using the MoveTo() method, I was able to animate the movement of Graphics as described in this page. After upgrading to 10.2.4, this is no longer the case. The MoveTo() method exists but the coordinates of the MapPoint are no longer changed. Edit: Apparently, the MoveTo() method returns a new MapPoint which I can assign to the Graphic. Will this be detrimental to performance? According to the page "Using MoveTo is more efficient that completely updating the graphic's geometry (that is, replacing it with a new MapPoint). When animating many graphics on the map, MoveTo will perform better." Message was edited by: Cedric Seah
... View more
10-13-2014
12:21 AM
|
1
|
2
|
3250
|