Getting 'The call is ambiguous between the following methods' when using SaveAsAsync in Esri.ArcGISRuntime.Mapping

474
2
Jump to solution
08-15-2017 02:17 PM
RobertAbell
New Contributor

I am using code in the documentation for the ArcGIS Runtime SDK for .NET (WPF) and am getting 'The call is ambiguous between the following methods or properties: 'Map.SaveAsAsync(ArcGISPortal, PortalFolder, string, string, IEneumerable<String>,Uri,bool' and 'Map.SaveAsAsync(ArcGISPortal, PortalFolder, string, string, IEneumerable<String>,RuntimeImage,bool''

When looking at the Map class the Uri method is marked as 'Obsolete' and says to use the 'RuntimeImage' method instead but I am not sure how to force the code to use the correct method.

Not sure what other details are needed to help define my question.

0 Kudos
1 Solution

Accepted Solutions
NagmaYasmin
Occasional Contributor III

Hi Robert,

You could use the Map.SaveAsync() method using a reference of RuntimeImage as below:

RuntimeImage img = null;
await _map.SaveAsAsync(agsOnline, null, title, description, tags, img);

If you have downloaded the samples, look at this sample named " AuthodEditSaveMap" , it has the implementation of this method. Hope that helps.

Nagma

View solution in original post

2 Replies
NagmaYasmin
Occasional Contributor III

Hi Robert,

You could use the Map.SaveAsync() method using a reference of RuntimeImage as below:

RuntimeImage img = null;
await _map.SaveAsAsync(agsOnline, null, title, description, tags, img);

If you have downloaded the samples, look at this sample named " AuthodEditSaveMap" , it has the implementation of this method. Hope that helps.

Nagma

RobertAbell
New Contributor

Thanks so much Nagma!  This worked perfectly and makes sense.  Appreciate the quick reply. :)