|
POST
|
In the new version of the TableOfContents it no longer uses the common LiyerList. This approach the basemap behaved similar to the OperationalLayer and both would have a check box. With the new design there is a TocItem.Content which differs for Basemap layers. This uses the BasemapItemTemplate and I see where this could be adjusted. Adding a check box isn't an issue but the issue is how would I tie the checkbox to the actual BaseLayer (we can assume there is only one). I tried this: <DataTemplate>
<Grid Margin="0,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding Content.BaseLayers[0].IsVisible, Mode=TwoWay}">
<!--<CheckBox.Style>
<Style TargetType="CheckBox">
<Style.Triggers>
<DataTrigger Binding="{Binding Content.CanChangeVisibility, Mode=OneTime}" Value="False">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</CheckBox.Style>-->
</CheckBox>
<TextBlock Text="{Binding Content.Name, Mode=OneWay}" Grid.Column="1" VerticalAlignment="Center" />
</Grid>
</DataTemplate> I have tried to find something showing how to bind to a specific item in the ItemsSource without any luck Thoughts? Morten Nielsen
... View more
04-23-2020
12:38 PM
|
0
|
2
|
1039
|
|
POST
|
I don't have things setup for android testing, but I run the one in iOS and it started without issue
... View more
04-21-2020
07:17 AM
|
0
|
0
|
985
|
|
POST
|
You need to cast the geometry to a MapPoint var mapPoint = (MapPoint)feature.Geometry; //assumes we know it is a point
double x = mapPoint.X;
double y = mapPoint.Y
... View more
04-21-2020
06:18 AM
|
2
|
0
|
1208
|
|
POST
|
If you're running on a server or as a service, don't tell anyone at esri
... View more
04-20-2020
09:02 AM
|
0
|
0
|
3004
|
|
POST
|
I did find a solution that works by setting the IsExpanded when the item is added to the collection. The following was added in the views code behind constructor var collection = TableOfContents.ItemsSource as INotifyCollectionChanged;
if ( collection == null ) return;
collection.CollectionChanged += (sender, args) =>
{
if ( args.NewItems == null ) return;
foreach (var item in args.NewItems)
{
if ( item is TocItem tocItem )
{
tocItem.IsExpanded = false;
}
}
};
... View more
04-17-2020
08:58 AM
|
0
|
0
|
1018
|
|
POST
|
Offline data is generated from a feature service not a map service. There is no other option. A .geodatabase is an offline replica, also that is the only format (it is just a sqliite database with a .geodatabase extension). In AGOL there is no such thing as a map service anymore, but can still do in ArcGIS Server You can setup the take a webmap offline approach to not bring down the tiles: OfflineMapTask offlineMapTask = await OfflineMapTask.CreateAsync(mapItem);
var parameters = await offlineMapTask.CreateDefaultGenerateOfflineMapParametersAsync(geometry, 0, 0);
parameters.IncludeBasemap = false;
var job = offlineMapTask.GenerateOfflineMap(parameters, mapPackageFolder); But the layers are still feature services, if you had MapService layers they would not be downloaded (also if a feature service is not defined for offline it will not be in the map)
... View more
04-17-2020
08:54 AM
|
1
|
1
|
1740
|
|
POST
|
In previous versions of the TableOfContents control the treeview was collapsed by default. Now in 100.7.1 it is expanded by default. We have a large number of layers and this is not acceptable to the users. Current default: I tried to see if I could close them when the TableOfContents is loaded by setting IsExpanded on the item to false, but this did not take foreach (var item in TableOfContents.ItemsSource)
{
if ( item is TocItem tocItem )
{
tocItem.IsExpanded = false;
}
} How can I get these to be collapsed when the TableOfContents initially Morten Nielsen Thanks -Joe
... View more
04-16-2020
10:50 AM
|
0
|
1
|
1048
|
|
POST
|
What I want to do is run a query on the created date field. In our specific case we want to know if any records with a specific attribute have been created that day. Something like... "Where CONTRACTOR = '{name}' AND CREATED_DATE = '04/14/2020'" I believe in a feature service I could do something like: "Where CONTRACTOR = '{name}' and CREATED_DATE = DATE '04/14/2020'" According to: Querying Feature Services: Date-Time Queries But don't seem to be able to get something like this working with a replica (and I have not tested this against a feature service to know if it would really work) Thanks -Joe
... View more
04-15-2020
07:47 AM
|
0
|
1
|
2559
|
|
POST
|
I'm just looking at the database to see how it is stored. My goal is to make a query like I described. So my real question is about doing that. In trying to set that up I looked at the database to see that it is stored within the replica as a double. Thinking if I could figure out how that is derived I may be able to do the query I would like. Right now I am stuck with returning all the records and then checking dates.
... View more
04-14-2020
04:58 PM
|
0
|
4
|
2559
|
|
POST
|
I see in the offline replica time is stored as a double. But I cannot figure out how this number is determined. I would have assumed it was unix time, but it is not. Follow-up to that is how could one query a replica using a date. I want something like: date component of datefield is April 14 2020. Right now the only thing I can see if to return all the rows and filter, obviously not the approach I would like to take. Thanks -Joe
... View more
04-14-2020
02:00 PM
|
0
|
7
|
2609
|
|
POST
|
Could you be a little more specific. The SketchEditor creates the geometry, so not sure what you mean by still works with the SketchEditor. If you needed associated attributes I would think you add them after the SketchEditor creates the geometry
... View more
03-31-2020
12:49 PM
|
0
|
0
|
1892
|
|
POST
|
You need the LocationDataSource if you want to use the features provided by the API for location tracking. In terms of the ExternalAccessory have you included the device(s) in info.plist? <key>UISupportedExternalAccessoryProtocols</key>
<array>
<string>com.geneq.sxbluegps</string>
<string>com.geneq.sxbluegpssource</string>
<string>com.geneq.sxbluegpsstatus</string>
</array> I wrote a blog post about setting this up in a Xamarin Forms application. Not sure if that would be useful for someone doing in iOS: https://community.esri.com/people/minerjoe/blog/2019/08/23/using-external-gps-from-xamarin-forms-ios
... View more
03-27-2020
07:40 AM
|
0
|
0
|
2158
|
|
POST
|
Fortunately creating a Rest Service in asp.net core is incredibly straight forward, VS gives a template that will generate the framework with an example Controller. One of the main issues in setting up using the Rest API with secure Portal services is you need to create a ArcGISHttpClientHandler // _portalManager is a service to mange my portal connections
ArcGISHttpClientHandler handler = new ArcGISHttpClientHandler { ArcGISCredential = await _portalManager.Credential(true) };
using var client = new HttpClient(handler); An operation that does a standard http get: var featureServiceUrl = new Uri($"{FeatureServiceUrl(replicaDefinition)}?f=json");
//confirm can connect to Url
var _ = await client.GetStringAsync(featureServiceUrl); A post is a little more involved but still pretty straight forward: var parameters = new Dictionary<string, string>
{
{"f", "json"},
{"async", "true"},
{"dataFormat", "sqlite"},
{"replicaID", replicaDefinition.ReplicaId.ToLower()},
{"rollbackOnFailure", "false"},
{"syncLayers", await GetSyncLayersAsync(replicaDefinition)},
{"transportType", "esriTransportTypeUrl"}
};
var content = new FormUrlEncodedContent(parameters);
var response = await client.PostAsync(requestUri, content);
if ( !(response.Content is ByteArrayContent byteArrayContent) ) return null;
var json = await byteArrayContent.ReadAsStringAsync();
var status = JsonConvert.DeserializeObject<StatusResponse>(json); Good luck
... View more
03-25-2020
07:45 AM
|
1
|
1
|
4459
|
|
POST
|
If you wanted to go down the C# route and create a service then yes you would need to make calls directly to the Rest API. Using python you could use the ArcGIS API for Python | ArcGIS for Developers. As Mike said, though, you can use the Javascript API and that gives high level language access to the Rest API similar to what Runtime gives from a WPF or Mobile application. From a web page, this would seem to me to be the best approach, I was just offering up alternatives if for some reason you wanted a different approach
... View more
03-24-2020
02:34 PM
|
1
|
3
|
4459
|
|
POST
|
For a server side application you could use the Rest API. Could do this through python, a C# service. Or you could use a ArcGIS Server SOE.
... View more
03-24-2020
01:21 PM
|
1
|
5
|
4459
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-11-2026 09:07 AM | |
| 1 | 10-23-2025 12:16 PM | |
| 1 | 10-19-2022 01:08 PM | |
| 1 | 09-03-2025 09:25 AM | |
| 1 | 04-16-2025 12:37 PM |
| Online Status |
Offline
|
| Date Last Visited |
3 weeks ago
|