|
POST
|
There's no way to create a geometry as union of other 2 geometries ? With WPF, you can use the Geometry.Combine method. But this one is not available with Silverlight. With Silverlight you can use the .Net Geometry API to make the union by yourself but it's not that easy (basically if it's a PathGeometry, you have to get the collection of PathFigures, to get the segments inside the PathFigure and to clone them in order to add them to the first geometry. Another option is you to execute two spatial queries (one by geometry) but for sure there is an impact on performances. Hope this help.
... View more
01-26-2011
04:00 AM
|
0
|
0
|
921
|
|
POST
|
I don't know what are the spatial references of your map (i.e your base map service) and of your map services. But if they are not identical you have to project the fullextent of the map services to the spatial reference of the map. Your code : 'envLayer.SpatialReference = Map.SpatialReference;' is not doing any projection, it's just setting a property of the geometry. Instead, if the two spatial references are different, the code should project envLayer to Map.SpatialReference. Most generally, to project a geometry, you can use a geometry service (see sample : http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Project). In the specific case of WebMercator<-->Geographical coordinates (but this doesn't seem your case), you can use the ESRI out-of-the-box transformation methods.
... View more
01-26-2011
03:51 AM
|
0
|
0
|
2782
|
|
POST
|
But, the trigger does not seem to do anything. After digging this issue, I found that the issue is coming from TargetName="Map". As it's defined in a template, the domain name is not the same and we can't access element name defined in the main page. Question: Does the ZoomToLayerAction work only for a Feature layer, or should it also work for any layer in a ArcGISDynamicMapServiceLayer? The ZoomToLayerAction is working for an ArcGISDynamicMapServiceLayer but is not working for the sublayers. Furthermore the action is not working if the layer is not in the same spatial reference than the map. With all these limitations, this action looks as not very useful in your case, so you should probably develop your own zoom code.
... View more
01-25-2011
08:11 AM
|
0
|
0
|
2782
|
|
POST
|
I am going to work on a sample allowing to add arrows (or other patterns) to lines. Here is a preview. Note that this sample is also able to transform lines to smooth curves:p I will post the code as soon as I will have cleaned this sample up.
... View more
01-25-2011
05:42 AM
|
0
|
0
|
3048
|
|
POST
|
At the client side, a feature layer can't be attached to a group layer, it's always directly attached to the map. If you publish a map service including group layers, you will see the group layers hierarchy if you are using an ArcGISDynamicMapServiceLayer but you won't see the group layers if you create feature layers. That's the default behavior. Now you can use the event Legend_Refreshed to customize the legend tree. From my understanding, in your case you should get twice the same layer legend : one coming from the ArcGISDynamicMapService, one from the feature layer created for maptips. In this case, you could remove the feature layer legend (or to move it in the right location in the ArcGISDynamicMapService layer legend )
... View more
01-25-2011
05:25 AM
|
0
|
0
|
452
|
|
POST
|
I added the code in the code behind, but I still get an error in the legenddialog.xaml indicating the ..........The property 'Map' was not found in type 'Control' Did you get this error in the design view of VS or during the compilation? If it's in the design view only, it's not important. You need at least one succesful compil in order the designer to know about your new property. In this case the compil should work whatever you see during the design. Still not sure if this is correct.... At first glance, it looks good.
... View more
01-21-2011
12:50 AM
|
0
|
0
|
631
|
|
POST
|
From everything I�??ve read version 4 is setup for VS 2010, not VS 2008. Right. But note that you can use SL4+ArcGIS SL2.1+VS2010 with ArcGIS server 9.3.1. So if you can upgrade your development PC, I would suggest this configuration. If for any reason, you can't install VS2010 on your desktop, you would have to use ArcGIS SL 1.2 with SL3. ArcGIS Server is located on the server machine, will I need to install Visual Studio there in order to develop web application, or can I deploy the finished site to the server�??s IIS when complete? You don't need Visual Studio on the Web Server. You can deploy when your application is ready.
... View more
01-20-2011
10:09 AM
|
0
|
0
|
585
|
|
POST
|
Depending on your data model, there are different ways to get related items: 1) if there is a relationship in your geodatabase between your parcels and your larger polygons, you can use a 'RelationShipQuery' (method ExecuteRelationshipQueryAsync) 2) if the relationship is managed by fields in the database, you can use simple queries by setting the right where clause 3) if the relationship is only spatially managed, you can use spatial query (by setting Geometry property of the query). From my understanding, you are in case 3), so a spatial query looks good.
... View more
01-20-2011
10:01 AM
|
0
|
0
|
1613
|
|
POST
|
I get the following error..........The property 'Map' was not found in type LegendDialog Looks like the Map property is not existing in your LegendDialog. Had you added your code when you got this error: protected static readonly DependencyProperty MapProperty =
DependencyProperty.Register("Map", typeof(Map), typeof(LegendDialog), new PropertyMetadata(OnMapPropertyChanged));
public Map Map
{
get { return (Map)this.GetValue(MapProperty); }
set
{
this.SetValue(MapProperty, (DependencyObject)value);
MessageBox.Show("in the GetValue(MapProperty");
}
}
private static void OnMapPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
MessageBox.Show("in the OnMapPropertyChanged");
}
not sure what was needed in the private void PopulateLayerList() At first glance you don't need it. My suggestion is to get rid of it.
... View more
01-20-2011
09:46 AM
|
0
|
0
|
2342
|
|
POST
|
Do you think I should try removing all the Silverlight stuff and the ArcGIS Silverlight API and reinstall them all? I don't think it's needed but the problem is that I have no clue:confused: I know that this already happened to me and it magically ended up working but no idea how. Perhaps try to clean your project, remove bin and obj directories, reexecute VS2010, ...... but no guarantee, sorry.
... View more
01-20-2011
09:42 AM
|
0
|
0
|
2109
|
|
POST
|
A value of type 'ZoomToAction' cannot be added to a collection or dictionary of type 'TriggerActionCollection' I already ran into this kind of problem when I was not referencing the most up to date System.Windows.Interactivity.dll. Which version are you referencing?
... View more
01-20-2011
08:47 AM
|
0
|
0
|
2109
|
|
POST
|
<esri:Legend Map="{Binding ElementName=MyMap}" This binding can't work if 'MyMap' is not in the same xaml file. One way to make working is to create a Map dependency property in your LegendDialog control by using the code Darina gave. Then in LegendDialog.xaml you can set a template binding to the map: <esri:Legend Map="{TemplateBinding Map}" .....
and in your main page, you can set the Map property of your LegendDialog by using an element name:
<local:LegendDialog x:Name="MyLegendDialog" Canvas.Left="430" Canvas.Top="200" Height="225" Width="218" Visibility="Collapsed"
Map="{Binding ElementName=MyMap}"
/>
... View more
01-20-2011
07:31 AM
|
0
|
0
|
2342
|
|
POST
|
Due to changes in the charting toolkit, the sample is no more working when updating to SL4 and the new toolkit version. I attached a new version of the sample working with SL4, ArcGIS SL2.1 and the latest toolkit. Hope this help.
... View more
01-20-2011
07:21 AM
|
0
|
0
|
1047
|
|
POST
|
The FeatureLayerInfo class is giving this info, so what you can do is to create a FeatureLayer by code (even without adding it the map, and get the needed info when the layer is initialized). Example of code: private void ArcGISDynamicMapServiceLayer_Initialized(object sender, System.EventArgs e)
{
ArcGISDynamicMapServiceLayer dynamicLayer = sender as ArcGISDynamicMapServiceLayer;
if (dynamicLayer != null)
{
FeatureLayer featureLayer = new FeatureLayer {Url = dynamicLayer.Url + "/0"};
featureLayer.Initialized += featureLayer_Initialized;
featureLayer.Initialize();
}
}
void featureLayer_Initialized(object sender, System.EventArgs e)
{
var featureLayer = sender as FeatureLayer;
if (featureLayer != null && featureLayer.LayerInfo.Relationships != null)
{
foreach (var relationShip in featureLayer.LayerInfo.Relationships)
Debug.WriteLine(string.Format("RelationShip ID={0} Name={1} RelatedTableId={2}", relationShip.Id, relationShip.Name,
relationShip.RelatedTableId));
}
} Used with this map service (http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer), the result is : RelationShip ID=1 Name=ServiceRequest_IncidentPriority RelatedTableId=1
... View more
01-20-2011
12:47 AM
|
0
|
0
|
523
|
| 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
|