POST
|
Hi All, I am using rest api to add features using c# HttpClient. My data is added successfully but i am getting response in html instead of JSON. here is my sample code: var client = new HttpClient(); client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/x-www-form-urlencoded"); client.DefaultRequestHeaders.TryAddWithoutValidation("Accept", "application/x-www-form-urlencoded"); var inputJson = JsonConvert.SerializeObject(featureOobj); var parameters = new Dictionary<string, string> { { "features", inputJson } }; var encodedContent = new FormUrlEncodedContent(parameters); HttpResponseMessage response = await client.PostAsync(url, encodedContent) How to receive rest api response in JSON? Any help would be appreciated. Regards, Prashant
... View more
01-15-2020
12:09 AM
|
0
|
2
|
844
|
POST
|
Hi All, I am using offline edit workflow in my application. I want to get newly added features that has not synced to server. Like in old 10.2 runtime api, feature is getting generated using '-ve' Fid but in 100.6 incremental objectId is automatically assigned to newly added feature. Is there any way to identify newly added features in .geodatabase? I can add new column and track changes with flag but looking for out of the box option. Any help would be appreciated, Regards, Prashant
... View more
12-17-2019
03:57 PM
|
0
|
2
|
609
|
POST
|
Hi Morten, I tried to calculate values to zoom out rectangle but not working as expected. Is it possible for you to provide any sample formula for below solution. The simplest would be just to take the current map-scale, and multiple it by the relative width between the view size and the rectangle size, and then zoom to that. Any help would be appreciated, Regards, Prashant
... View more
12-16-2019
05:46 PM
|
0
|
0
|
852
|
POST
|
Hi Morten, Yes, this is working in case of zoom-In but how to implement zoom-Out? I tried to below code for zoom out but not sure how to determine zoom level i.e. for small rectangle zoom out to lowest zoom level. Geometry geometry = await MpView.SketchEditor.StartAsync(SketchCreationMode.Rectangle, false); var point = MpView.LocationToScreen(geometry.Extent.GetCenter()); Esri.ArcGISRuntime.UI.Controls.MapViewAutomationPeer peer = Esri.ArcGISRuntime.UI.Controls.MapViewAutomationPeer.FromElement(MpView) as Esri.ArcGISRuntime.UI.Controls.MapViewAutomationPeer; peer.ZoomOutAnimated(point); Working zoom in code as you suggested: Geometry geometry = await MpView.SketchEditor.StartAsync(SketchCreationMode.Rectangle, false); await MpView.SetViewpointGeometryAsync(geometry.Extent); Regards, Prashant
... View more
12-03-2019
03:46 PM
|
0
|
2
|
852
|
POST
|
Thanks Michael for reply, I am migrating my app esri runtime 10.7 to 100.6 and would like to keep consistent behavior. Application is mainly used for data capturing and hosted on windows motion tablet so I am looking for both options. Out of the box navigation is working fine but just wanted to know is it not possible to zoom in/out using mouse + drawing rectangle without shift key? Regards, Prashant Kirpan
... View more
12-02-2019
04:04 PM
|
0
|
0
|
852
|
POST
|
Hi All, I am trying to build basic navigation control on map.On button click I want to draw rectangle and perform zoom in/out operation. I found MapViewAutomationPeer clss to control map zoom but it doesn't work as expected. ZoomInAnimated/ZoomOutAnimated only zoom to center point. No option for scale. What is the best approach to zoom using rectangle size? i.e. if the rectangle is bigger than zoom to less scale else on higher side. I am using WPF 100.6 Any help would be appreciated. Regards, Prashant
... View more
11-28-2019
07:52 PM
|
0
|
6
|
1027
|
POST
|
Hi All, I am trying to implement spatial filter on feature service. I believe SketchEditor would be appropriate control for this. I have toolbar button on map to activate spatial filter and keep activate until user selects another tool. Once i finished drawing with SketchEditor it does't allow me to draw another object. Is there any way i can draw multiple objects simultaneously after activating control? Any help would be appreciated. Prashant
... View more
11-20-2019
08:00 PM
|
0
|
1
|
443
|
POST
|
Really appreciate your help Joe, As you said earlier, I have verified my Bluetooth GPS(Garmin) device and it uses serial port for communication. So I can use dotMorten/NmeaParser library as is for now. I will definitely try to integrate Bluetooth locationdatasource code if required. Thanks again, Prashant
... View more
09-22-2019
05:24 PM
|
0
|
0
|
1118
|
POST
|
Thanks Joe for sample code, really helps me to find out root cause of error. I have just tried below code (instead of LayerCollection i used base layer class in observable collection) and that works for me without modifying map.OperationalLayers but I am not sure whether this is a correct approach or not. Because operational layer reference is used in couple of user controls so probably it may create an issue if I continuously modify map.operationallayers object on runtime. LayerListControlViewModel.cs public ObservableCollection<Layer> OperationalLayers { get; set; } = new ObservableCollection<Layer>(); public void InitializeLayerListControl(Map mapObj) { foreach (var item in mapObj.OperationalLayers) { //business logic OperationalLayers.Add(item); } } Regards, Prashant
... View more
09-18-2019
05:46 PM
|
0
|
0
|
2509
|
POST
|
I was looking dotMorten/NmeaParser. Is location provider works for bluetooth GPS for Windows WPF desktop app? If not, then could you please point me in the right direction to make it working. Thanks, Prashant
... View more
09-18-2019
12:18 AM
|
0
|
3
|
1118
|
POST
|
Thanks Morten for reply, First, I have added all layers to map and then send operational layers reference Map.OperationalLayers to other user control. Other control extracts layers from reference and add into his own collection - here i am getting exception I defined collection as below and bind OperationalLayers property to user control. public LayerCollection OperationalLayers { get; set; } = new LayerCollection(); I am quite sure that I am not adding layer in map.operational layer collection. Is there any reference issue with using LayerCollection class? Regards, Prashant
... View more
09-17-2019
11:25 PM
|
0
|
2
|
2509
|
POST
|
Hi All, I want to show available satellites info in application. In latest .Net 100 API i am not able to find any relevant classes. I believe LocationDisplay only provides location information of device. If functionality is not provided by runtime API then what is the best approach to get satellite details without external GPS? Any help would be appreciated. Regards, Prashant
... View more
09-17-2019
08:39 PM
|
0
|
5
|
1311
|
POST
|
Try this, I haven't tested but this should work <esri:MapView x:Name="MyMapView" /> In Code behind of map control access map view and assign to viewmodel prperty public MainWindow() { InitializeComponent(); ((MapViewModel)this.DataContext).MyMapView = this.MyMapView; } MapViewModel: public MapView MyMapView { get; set; } public MapView MyMapView { get; set; } All members of MapView will be available in view model Regards, Prashant
... View more
09-12-2019
09:02 PM
|
1
|
0
|
2709
|
POST
|
Hi, Create Property in viewmodel.cs and bind it to map object in XAMl. After that you can pass Map object to your model class. Create Map object in viewmodel constructor. Sample code: public Map Map { get; set; }
public ViewModel()
{
Map = new Map(new Basemap(basemapLyrs));
myModel = new Model(Map );
this.CreateLocalServiceAndDynamicLayer();
} <esri:MapView x:Name="AppMapView" Map="{Binding Map}" Regards, Prashant
... View more
09-10-2019
08:09 PM
|
0
|
0
|
352
|
Title | Kudos | Posted |
---|---|---|
1 | 09-12-2019 09:02 PM | |
1 | 11-03-2021 12:16 AM | |
1 | 02-01-2021 03:10 PM | |
1 | 01-19-2021 05:45 PM | |
1 | 09-01-2019 08:19 PM |
Online Status |
Offline
|
Date Last Visited |
08-07-2023
12:11 AM
|