POST
|
This was fixed by Esri technical support. The old version licences were removed from our subscription (I think after the latest renewal) and they had to re-add them. Thanks also Josh for your answer. I was aware of the different product names but this could be useful to know for others.
... View more
08-15-2019
05:40 PM
|
0
|
0
|
590
|
POST
|
My ArcGIS Developer Subscription (AGS) previously included ArcGIS for Server 10.1-10.4.1 licences but these are now missing. The only licences now available are for 10.6 or 10.7. Are AGS Server licences limited to only 10.6 or 10.7, or can I have access to a licence that will work on Server 10.4.1? We still develop applications for Server 10.4.1 so only having access to the new versions means we can't do this development work.
... View more
07-28-2019
08:57 PM
|
0
|
2
|
808
|
POST
|
Hi all, For anyone that gets this issue after upgrading to 10.4.1, there is a new security setting that blocks GET token requests by default. We had to enable this again to get our proxy page working, via the ArcGIS admin page. For details, refer to http://server.arcgis.com/en/server/latest/administer/windows/enable-token-acquisition-through-an-http-get-request.htm
... View more
11-06-2016
06:04 PM
|
0
|
0
|
747
|
POST
|
I have added an idea to add support for graphics layers in the LayerList widget: https://community.esri.com/ideas/12239
... View more
06-29-2016
08:32 PM
|
0
|
0
|
1062
|
IDEA
|
The new LayerList widget is great, but currently it only supports Feature Layers and map services. It would be much more useful if it also supported graphics layers. A 'remove layer' button built into the widget would be also be a useful option.
... View more
06-29-2016
08:28 PM
|
14
|
0
|
1588
|
POST
|
I have tried the GeometryEngine.union method (within JavaScript 3.15 API) but it throws the following error when it is placed within a try-catch statement: TypeError: Unable to get property 'hq' of undefined or null reference It seems to work when not placed within a try-catch, but since it is throwing this error I'm concerned about using it within a production application. Also, the equivalent Union method in the ArcGIS Server GeometryService does not throw an error. I thought the error might be due to undefined spatial references in the array of geometries passed to it, but I have checked and they are all defined. Can anyone please advise why this error is being thrown? arrayUtils.forEach(AdviceGlobal.savedFeaturesGraphicsLayer.graphics, function (savedGraphic) {
// Define spatial reference for geometryEngine
var thisGeometry = savedGraphic.geometry;
console.log(thisGeometry.spatialReference);
if (thisGeometry.spatialReference == null) {
thisGeometry.spatialReference = map.spatialReference;
}
geometryToCapture.push(thisGeometry);
});
// Try geometryEngine
try {
var unionedGeometry = geometryEngine.union(geometryToCapture);
saveFeature(unionedGeometry);
}
catch (e) {
onUnionError(e);
}
... View more
12-11-2015
12:10 AM
|
1
|
12
|
5863
|
POST
|
Hi Jennifer, I'm not sure, how do I run Identify and Query using REST end point from a web browser? Cheers, Andrew
... View more
02-26-2012
10:38 PM
|
0
|
0
|
578
|
POST
|
Hi Jennifer, Thanks for your reply. I have looked at what gets passed to the IdentifyTask via Fiddler (minus the workaround). The MaxAllowableOffset never gets set by the IdentifyTask if it is not set in the code. However, on subsequent runs of the IdentifyTask the geometry that is returned has been generalised, even though in my code MaxAllowableOffset only ever gets set by the QueryTask, not by the IdentifyTask. Does this mean that MaxAllowableOffset is a global setting that is read by all geometry tasks, and has to be reset every time? Also, there does not seem to be a way to set MaxAllowableOffset back to zero, as setting it to either zero or a negative value is ignored (I checked this via Fiddler - MaxAllowableOffset is not passed if set to a value <= 0). So at the moment the only workaround I have found is to set it to a small value. Cheers Andrew
... View more
02-22-2012
05:07 PM
|
0
|
0
|
578
|
POST
|
Hello, I am having a problem with using the IdentifyTask in conjunction with a QueryTask and the MaxAllowableOffset option. I am first using the IdentifyTask to find features in a dynamic map service layer that intersect a given graphics layer feature. Then if any of the features have more than a certain number of vertices I am running a QueryTask and setting MaxAllowableOffset to generalise the feature, but only for those features. This works fine the first time it is run, but after the first run the IdentifyTask appears to be using the MaxAllowableOffset value that was set by the QueryTask, so all the features are generalised by the IdentifyTask! I have tried setting MaxAllowableOffset for the IdentifyTask to zero (via IdentifyParameters.MaxAllowableOffset) and this didn't fix the problem. However, when I set IdentifyParameters.MaxAllowableOffset to a small value (0.001 metres) it fixed the problem. This doesn't seem like a nice workaround, so I'm hoping someone can explain why this is happening, or whether this is a bug? Cheers, Andrew Here's a summary of the code:
IdentifyParameters sitesQueryIdentifyParams = new IdentifyParameters();
sitesQueryIdentifyParams.Geometry = selectedUnionedGeometry;
sitesQueryIdentifyParams.MapExtent = _map.Extent;
sitesQueryIdentifyParams.Width = (int)_map.ActualWidth;
sitesQueryIdentifyParams.Height = (int)_map.ActualHeight;
// Set sites query identify tolerance to 0 pixels
sitesQueryIdentifyParams.Tolerance = 0;
sitesQueryIdentifyParams.LayerOption = LayerOption.all;
// Perform identify on Sites layer
sitesQueryIdentifyParams.LayerIds.Add(Convert.ToInt16(_sitesLayerId));
sitesQueryIdentifyParams.SpatialReference = _map.SpatialReference;
// TEST - Explicitly set MaxAllowableOffset - this only works when set to a small value
sitesQueryIdentifyParams.MaxAllowableOffset = 0.001;
// Perform Sites Query Identify operation (asynchronously)
IdentifyTask sitesQueryIdentifyTask = new IdentifyTask(_ahelpPilotMapUrl);
// Disable caching identify results
sitesQueryIdentifyTask.DisableClientCaching = true;
sitesQueryIdentifyTask.ExecuteCompleted += SitesQueryIdentifyTask_ExecuteCompleted;
sitesQueryIdentifyTask.Failed += SitesQueryIdentifyTask_Failed;
sitesQueryIdentifyTask.ExecuteAsync(sitesQueryIdentifyParams, graphicsLayerLabel);
...
private void SitesQueryIdentifyTask_ExecuteCompleted(object sender, IdentifyEventArgs args)
{
_identifyGraphics = new List<Graphic>();
foreach (IdentifyResult result in args.IdentifyResults)
{
_identifyGraphics.Add(result.Feature);
}
// Loop through graphics, for each graphic count number of vertices (polygons/lines only) and if greater than a threshold generalise
_identifyGraphicsToGeneralise = new List<Graphic>();
_identifyGeneraliseCompleteCount = 0;
foreach (Graphic identifyGraphic in _identifyGraphics)
{
int identifyVerticeCount = 0;
if (identifyGraphic.Geometry is ESRI.ArcGIS.Client.Geometry.Polygon)
{
ESRI.ArcGIS.Client.Geometry.Polygon identifyPolygon = (ESRI.ArcGIS.Client.Geometry.Polygon)identifyGraphic.Geometry;
ObservableCollection<ESRI.ArcGIS.Client.Geometry.PointCollection> identifyPolyRings = identifyPolygon.Rings;
foreach (ESRI.ArcGIS.Client.Geometry.PointCollection identifyRing in identifyPolyRings)
{
identifyVerticeCount += identifyRing.Count;
}
}
else if (identifyGraphic.Geometry is ESRI.ArcGIS.Client.Geometry.Polyline)
{
ESRI.ArcGIS.Client.Geometry.Polyline identifyPolyline = (ESRI.ArcGIS.Client.Geometry.Polyline)identifyGraphic.Geometry;
foreach (ESRI.ArcGIS.Client.Geometry.PointCollection identifyPath in identifyPolyline.Paths)
{
identifyVerticeCount += identifyPath.Count;
}
}
if (identifyVerticeCount > _MAX_VERTICES)
{
// Add to list of graphics to generalise
_identifyGraphicsToGeneralise.Add(identifyGraphic);
}
}
foreach (Graphic identifyGeneraliseGraphic in _identifyGraphicsToGeneralise)
{
// Use QueryTask to run query for this graphic, set MaxAllowableOffset to reduce vertices
QueryTask identifyQueryGeneralizeTask = new QueryTask(_ahelpPilotMapUrl + "/" + _sitesLayerId);
// Disable caching query results
identifyQueryGeneralizeTask.DisableClientCaching = true;
identifyQueryGeneralizeTask.ExecuteCompleted += IdentifyQueryTaskGeneralize_ExecuteCompleted;
identifyQueryGeneralizeTask.Failed += IdentifyQueryTaskGeneralize_Failed;
ESRI.ArcGIS.Client.Tasks.Query identifyQueryGeneralize = new ESRI.ArcGIS.Client.Tasks.Query();
// Set up query for given feature
identifyQueryGeneralize.Where = _OBJECTID_FIELD_NAME + "=" + identifyGeneraliseGraphic.Attributes[_OBJECTID_FIELD_NAME].ToString();
// Specify same projection as first layer of map, as this will determine overall spatial projection
identifyQueryGeneralize.OutSpatialReference = _map.SpatialReference;
identifyQueryGeneralize.ReturnGeometry = true;
// Set max allowable offset for sites with a lot of vertices, to reduce size of geometry returned
identifyQueryGeneralize.MaxAllowableOffset = _MAX_ALLOWABLE_OFFSET;
// Add all fields to query so they are all returned with geometry
identifyQueryGeneralize.OutFields.Add("*");
identifyQueryGeneralizeTask.ExecuteAsync(identifyQueryGeneralize, identifyGeneraliseGraphic);
}
...
... View more
02-22-2012
12:07 AM
|
0
|
5
|
3210
|
POST
|
Hi Dominique, Thanks for your reply. Is this a bug in the Silverlight API or in ArcGIS Server? I'm asking because I'm wondering when this bug might be fixed (and I'm hoping it is in the Silverlight API because then it might be fixed sooner!). Cheers Andrew
... View more
11-23-2011
04:09 PM
|
0
|
0
|
551
|
POST
|
Hi, I am using a geometry service's ProjectAsync method to project some graphics in an application, and I am passing the graphic layer name as a string using the userToken parameter: GeometryService ProjectShapefileService = new GeometryService(_geometryServiceUrl);
ProjectShapefileService.ProjectCompleted += ProjectShapefileService_ProjectCompleted;
ProjectShapefileService.Failed += ProjectShapefileService_Failed;
ProjectShapefileService.ProjectAsync(thisShapefileGraphics, _map.SpatialReference, shapefileName); This works fine, except that when the project operation fails the UserState object that is returned via the Failed event (within the args object) does not match the type of the userToken parameter (in this case it is not a string). Instead it is a generic object array (see attached screenshot for debugging example). private void ProjectShapefileService_Failed(object sender, TaskFailedEventArgs args)
{
// This is what I need to do to get to the graphics layer name (passed via the userToken parameter)
object[] thisUserState = (args.UserState as object[])[0] as object[];
string thisShapefileName = thisUserState[2] as string;
// If this worked like other geometry service methods, I should be able to do this instead. Why not?
//string thisShapefileName = args.UserState as string; Is there an easier way to get to the userToken parameter that was passed to the geometry service? Cheers, Andrew
... View more
11-22-2011
08:24 PM
|
0
|
5
|
881
|
POST
|
Hi Dominique, Awesome, thank you! Changing the XAML visibility code to use 'Layer' instead of 'Name' worked, so I now have a right-click context menu just for graphics layers.
Visibility="{Binding Layer, Converter={StaticResource VisibilityConverter}, ConverterParameter=Layer}" Cheers, Andrew
... View more
10-17-2011
08:31 PM
|
0
|
0
|
183
|
POST
|
Hi, I am using the legend control and have set up a MapLayerTemplate, LayerTemplate and LegendItemTemplate to control how the legend items are drawn. This is working fine, but now I am trying to create a different template for graphics layers in the map, so I can add a right-click context menu that appears only when clicking on graphics layers. I can see three approaches to this, but I can't see how to get any of them to work: 1. Set up multiple templates in XAML (It looks as if this will be supported in Silverlight 5, but can this be done somehow at version 4?). 2. Change the data template in code behind. 3. Bind data template elements in XAML and use a valueconverter to set visibility property. I can't see how to do the first two approaches, but I have found some silverlight examples that try the third approach (e.g. http://forums.silverlight.net/t/215879.aspx), so I have tried this in the code below. Unfortunately it doesn't work and the valueconverter code doesn't get called at all. XAML code: <UserControl.Resources>
<ahelp:ContextMenuVisibilityConverter x:Key="VisibilityConverter" />
</UserControl.Resources>
...
<esri:Legend.MapLayerTemplate>
<DataTemplate>
<Grid Width="210" Height="Auto" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<CheckBox Content="{Binding Label}"
IsChecked="{Binding IsEnabled, Mode=TwoWay}"
IsEnabled="True" HorizontalAlignment="Left" Grid.Column="0" >
</CheckBox>
<Slider Maximum="1" Value="{Binding Layer.Opacity,Mode=TwoWay}" Width="60" Margin="5,0,0,0" HorizontalAlignment="Right" Grid.Column="1" ></Slider>
<toolkit:ContextMenuService.ContextMenu>
<toolkit:ContextMenu Name="LayerContextMenu">
<toolkit:MenuItem Name="ZoomToLayerContextMenuItem" Header="Zoom to Layer" Visibility="{Binding Name, Converter={StaticResource VisibilityConverter}, ConverterParameter=Name}">
<toolkit:MenuItem.Icon>
<Image Source="UserControls/Images/ZoomInSmall.png" Stretch="None" Margin="0" />
</toolkit:MenuItem.Icon>
</toolkit:MenuItem>
<toolkit:Separator Name="SeparatorContextMenuItem" />
<toolkit:MenuItem Name="RemoveLayerContextMenuItem" Header="Remove Layer">
<toolkit:MenuItem.Icon>
<Image Source="UserControls/Images/RemoveLayerSmall.png" Stretch="None" Margin="0" />
</toolkit:MenuItem.Icon>
</toolkit:MenuItem>
</toolkit:ContextMenu>
</toolkit:ContextMenuService.ContextMenu>
</Grid>
</DataTemplate>
</esri:Legend.MapLayerTemplate> C# code behind: public class ContextMenuVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
string valueString = value as string;
if (valueString.Contains("GraphicsLayer"))
return Visibility.Visible;
else
return Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
} In the XAML code, can the following line be changed so the valueconverter is called and the name of the layer is passed? Visibility="{Binding Name, Converter={StaticResource VisibilityConverter}, ConverterParameter=Name}" Any help would be much appreciated! Cheers, Andrew
... View more
10-12-2011
09:38 PM
|
0
|
2
|
1293
|
Title | Kudos | Posted |
---|---|---|
14 | 06-29-2016 08:28 PM | |
1 | 12-11-2015 12:10 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|