<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem consuming Annotation Layer: &amp;quot;invalid response&amp;quot; in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/problem-consuming-annotation-layer-quot-invalid/m-p/123918#M1388</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to learn how to consume an "Annotation Layer" from the UWP Runtime.&amp;nbsp; My first thought was to&amp;nbsp;use the AnnotationLayer object in the same way that I had used "FeatureLayer" before.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Uri uri = new Uri(_AnnotationUri.ToString() + "/" + _AnnotationLayerId.ToString());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;_AnnotationLayer = new AnnotationLayer(uri);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;_AnnotationLayer.IsVisible = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _MapView.Map.OperationalLayers.Add(_AnnotationLayer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;await _AnnotationLayer.LoadAsync();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this gives an error "invalid response" on the last line, with no further information.&amp;nbsp; Am I doing this correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I watched the&amp;nbsp;traffic in Fiddler, and it seems that it is dropping off the&amp;nbsp;layer id in the request uri.&amp;nbsp; The response looks like&amp;nbsp;a description of all the layers on the service, not just the one I was after.&amp;nbsp; This would account for the "invalid response".&amp;nbsp; But what is the correct way to load and display an Annotation Layer then?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Oct 2019 19:29:14 GMT</pubDate>
    <dc:creator>PhilScovis</dc:creator>
    <dc:date>2019-10-09T19:29:14Z</dc:date>
    <item>
      <title>Problem consuming Annotation Layer: "invalid response"</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/problem-consuming-annotation-layer-quot-invalid/m-p/123918#M1388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to learn how to consume an "Annotation Layer" from the UWP Runtime.&amp;nbsp; My first thought was to&amp;nbsp;use the AnnotationLayer object in the same way that I had used "FeatureLayer" before.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Uri uri = new Uri(_AnnotationUri.ToString() + "/" + _AnnotationLayerId.ToString());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;_AnnotationLayer = new AnnotationLayer(uri);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;_AnnotationLayer.IsVisible = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt; _MapView.Map.OperationalLayers.Add(_AnnotationLayer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;await _AnnotationLayer.LoadAsync();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this gives an error "invalid response" on the last line, with no further information.&amp;nbsp; Am I doing this correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I watched the&amp;nbsp;traffic in Fiddler, and it seems that it is dropping off the&amp;nbsp;layer id in the request uri.&amp;nbsp; The response looks like&amp;nbsp;a description of all the layers on the service, not just the one I was after.&amp;nbsp; This would account for the "invalid response".&amp;nbsp; But what is the correct way to load and display an Annotation Layer then?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2019 19:29:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/problem-consuming-annotation-layer-quot-invalid/m-p/123918#M1388</guid>
      <dc:creator>PhilScovis</dc:creator>
      <dc:date>2019-10-09T19:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problem consuming Annotation Layer: "invalid response"</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/problem-consuming-annotation-layer-quot-invalid/m-p/123919#M1389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you share an example of the URI string you're providing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2019 20:24:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/problem-consuming-annotation-layer-quot-invalid/m-p/123919#M1389</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2019-10-09T20:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem consuming Annotation Layer: "invalid response"</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/problem-consuming-annotation-layer-quot-invalid/m-p/123920#M1390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure.&amp;nbsp; This is not public, but you can see what it looks like:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://usalvwdgis1.infor.com:6443/arcgis/rest/services/WALTERS/Sacramento_AnnoTest/MapServer" title="https://usalvwdgis1.infor.com:6443/arcgis/rest/services/WALTERS/Sacramento_AnnoTest/MapServer"&gt;https://usalvwdgis1.infor.com:6443/arcgis/rest/services/WALTERS/Sacramento_AnnoTest/MapServer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is adding on a /0 to the end.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://usalvwdgis1.infor.com:6443/arcgis/rest/services/WALTERS/Sacramento_AnnoTest/MapServer/0" title="https://usalvwdgis1.infor.com:6443/arcgis/rest/services/WALTERS/Sacramento_AnnoTest/MapServer/0"&gt;https://usalvwdgis1.infor.com:6443/arcgis/rest/services/WALTERS/Sacramento_AnnoTest/MapServer/0&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as I said, the layer id is&amp;nbsp;being stripped off in the actual request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The response to the runtime looks like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;{"currentVersion":10.51,"serviceDescription":"","mapName":"Layers","description":"","copyrightText":"","supportsDynamicLayers":true,"layers":[{"id":0,"name":"ParcelsAnno2","parentLayerId":-1,"defaultVisibility":true,"subLayerIds":[1,2,3],"minScale":20000,"maxScale":0}, ... and so on.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which, of course, is not going to the specific layer I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Going through a browser, and including the layer id, I would get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;{"currentVersion":10.51,"id":0,"name":"ParcelsAnno2","type":"Annotation Layer","description":"","geometryType":"esriGeometryPolygon","sourceSpatialReference":{"wkid":102642,"latestWkid":2226},"copyrightText":"","parentLayer":null,"subLayers":[{"id":1,"name":"Default"},{"id":2,"name":"GT37065"}, ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the problem seems to be in how I am initializing or using the AnnotationLayer object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2019 20:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/problem-consuming-annotation-layer-quot-invalid/m-p/123920#M1390</guid>
      <dc:creator>PhilScovis</dc:creator>
      <dc:date>2019-10-09T20:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem consuming Annotation Layer: "invalid response"</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/problem-consuming-annotation-layer-quot-invalid/m-p/123921#M1391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Annotation is currently only supported from the `.../FeatureServer/... endpoint so your code just needs to be updated to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;`&lt;A class="unlinked"&gt;https://usalvwdgis1.infor.com:6443/arcgis/rest/services/WALTERS/Sacramento_AnnoTest/FeatureServer/0&lt;/A&gt;`&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2019 16:21:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/problem-consuming-annotation-layer-quot-invalid/m-p/123921#M1391</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2019-10-10T16:21:02Z</dc:date>
    </item>
  </channel>
</rss>

