|
POST
|
As long as your REST end point is returning geographical coordinates, you will run into this issue. At this time, I have no clue. Try a web request like this one (after changing the url to your layer): http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer/2/query?text=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&where=1%3D1&returnGeometry=true&outSR=102002&outFields=&f=html You should get non geographical coordinates. Note: a workaround might be you to use a map in geographical coordinates, so a TiledMapServiceLayer using a geographical spatial reference.
... View more
12-16-2010
05:09 AM
|
0
|
0
|
2932
|
|
POST
|
i also tried to put the extent in xaml and in code behind. no luck. Do you mean that whatever the map extent you initialize, the result is the same? Looks strange:confused:
... View more
12-16-2010
04:44 AM
|
0
|
0
|
804
|
|
POST
|
If the map contains tiled layers, the minimum and maximum resolutions are initialized from these layers. It's why the sample is working without manual initializations.
... View more
12-16-2010
04:38 AM
|
0
|
0
|
953
|
|
POST
|
I am not sure you still run into the same issue. It could be a limitation of the 'where' clause size. If you don't initialize the 'Where' clause, are you able to get all the records you are expecting? If the issue is tied to a big where clause, which API version are you using? Some enhancements have been made on ArcGIS 2.1 for this point, so if you are not using the latest version, it could worth the try to update.
... View more
12-16-2010
04:31 AM
|
0
|
0
|
980
|
|
POST
|
Refreshed event is fired once by map layer as soon as the legend infos are available for the layer. If your map contains a dynamic map service layer and a feature layer, your event handler will be called twice. By testing the LayerItem given by RefreshedEventArgs, you can know which layer legend you are working on. To change a label, your code should look like: private void Legend_Refreshed(object sender, Legend.RefreshedEventArgs e)
{
if (e.LayerItem.Layer.ID == "MyFeatureLayer") // could be a test on old label, layer type, url, ...
e.LayerItem.Label = "MyAlias";
}
... View more
12-16-2010
04:19 AM
|
0
|
0
|
332
|
|
POST
|
On event 'Refreshed', you can also change or reorganize any legend item (as you did for removing). A LegendItemViewModel has 3 main properties that you can change: - Label (that you can change to your alias) - ImageSource - Description (used in tooltip) Concerning the removal of the group layer node, the legend control has 2 built-ins mode : "Tree" and "Flat". With the flat mode (LayerItemsMode="Flat"), the group layers are not shown, so it might be what you need. For other specific cases, you need either to template the control or to change the layer tree by code in event 'Refreshed'.
... View more
12-15-2010
02:06 AM
|
0
|
0
|
2378
|
|
POST
|
It's a bug in the sample. To fix it, 1) in MapPrinter.xaml.cs(OnRotateMapChanged method), add a test on _isLoaded:
private void OnRotateMapChanged(bool rotateMap)
{
if (_isLoaded)
{
_printMap.Rotation = (rotateMap ? -90 : 0);
PreparePages();
}
} 2) in MapPrinter.xaml.cs(OnApplyTemplate method), initialize the map rotation: _isLoaded = true;
_printMap.SizeChanged += (s, e) => { PreparePages(); SetPrintMapExtent(CurrentPage); }; // Calculate print pages when printMap size will be known (or changed by selecting a printer or a printer paper size)
_printMap.Rotation = (RotateMap ? -90 : 0);
PreparePages();
3) in CloneMap.cs(Clone method), don't initialize the map rotation: map.TimeExtent = mapToClone.TimeExtent;
//map.Rotation = mapToClone.Rotation;
int index = 0;
Thanks for pointing this out.
... View more
12-15-2010
01:17 AM
|
0
|
0
|
2999
|
|
POST
|
So, it seems that the issue is coming from the full extent of your ortho photo layer. Could you verify that the full extent of this layer is bigger than what you see? Anyway, if you know the extent you need, a possible workaround is to set the extent of the map in XAML : <esri:Map Extent=".........
... View more
12-15-2010
01:07 AM
|
0
|
0
|
804
|
|
POST
|
I can't guess where the issue is with so few infos. What is your event handler code? Which error are you getting?
... View more
12-14-2010
01:52 AM
|
0
|
0
|
2378
|
|
POST
|
As you renamed the xap file, you have to change the source param in the html file as well. Something like:
<param name="source" value="ClientBin/Test.xap"/>
With this 4th step, it should work.
... View more
12-13-2010
11:49 PM
|
0
|
0
|
2109
|
|
POST
|
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.
... View more
12-13-2010
11:47 PM
|
0
|
0
|
3106
|
|
POST
|
You can remove legend items in legendrefreshed event handler. There is a sample in the InteractiveSDK. The code looks like:
if (removeLayerItemVM != null)
e.LayerItem.LayerItems.Remove(removeLayerItemVM);
... View more
12-13-2010
11:35 PM
|
0
|
0
|
2378
|
|
POST
|
In this sample application, the identify functionality is binded to the visibility of the identify windows (i.e. the identify functionality is off when the window is closed and the functionality is on when the window is open). View it live. Note that it's not a recommended approach, just my 2 cts.
... View more
12-10-2010
06:23 AM
|
0
|
0
|
1682
|
|
POST
|
The LegendItemViewModel class has a property called 'IsSelected', so, despite that there is no 'SelectionChanged' event (as Jennifer mentionned) if you want to get the selected items, you can loop on all legend items and test this property. The touchy part is that you have to go though the legend items tree hierarchy. Example of legend extension class returning the selected items: public static class LegendExtension
{
public static IEnumerable<LegendItemViewModel> SelectedItems(this Client.Toolkit.Legend legend)
{
if (legend == null)
return null;
return legend.LayerItems.Descendants().Where(item => item.IsSelected);
}
private static IEnumerable<LegendItemViewModel> Descendants(this IEnumerable<LayerItemViewModel> layerItems)
{
if (layerItems == null)
yield break;
foreach (var layerItem in layerItems)
{
yield return layerItem;
// return legend items
if (layerItem.LegendItems != null)
{
foreach (var item in layerItem.LegendItems)
yield return item;
}
// return recursively layer items
if (layerItem.LayerItems != null)
{
foreach (var item in layerItem.LayerItems.Descendants())
yield return item;
}
}
}
} Then you can get the Selected items by 'MyLegend.SelectedItems()'. I see that there is either zero or one selected item in the tree at any given time. That's true with the default legend template, but we can imagine that one changes it to allow multiple selection. It's why my 'SelectedItems' returns a collection, but you can simplify to only one item if you assume that only one item is selectable at once.
... View more
12-09-2010
08:47 AM
|
0
|
0
|
1849
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-12-2025 03:01 AM | |
| 1 | 10-14-2025 09:24 AM | |
| 1 | 06-13-2013 09:22 AM | |
| 1 | 04-29-2022 02:21 AM | |
| 1 | 04-29-2022 02:28 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-30-2025
08:06 AM
|