<?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 Re: Z,X,Y Vector tiles on Maui .NET project / ArcGISVectorTiledLayer in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1430189#M12688</link>
    <description>&lt;P&gt;I've updated my question with providing more information about what's in our endpoint responses.&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2024 10:15:19 GMT</pubDate>
    <dc:creator>jm2024</dc:creator>
    <dc:date>2024-05-10T10:15:19Z</dc:date>
    <item>
      <title>Z,X,Y Vector tiles on Maui .NET project / ArcGISVectorTiledLayer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1417072#M12657</link>
      <description>&lt;P&gt;I would like to use VectorTiles using ArcGIS .NET map for .NET MAUI.&lt;BR /&gt;Before I was using MapboxSDK and run into some issues related to migration from Xamarin to MAUI and I am testing alternatives.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So what I have in code:&lt;/P&gt;&lt;P&gt;- For passing our endpoint requied header&lt;/P&gt;&lt;LI-CODE lang="c"&gt;AuthenticationManager.Current.ChallengeHandler = new ChallengeHandler(async (CredentialRequestInfo info) =&amp;gt;
{
    if (info.ServiceUri.Host == "myhost.com")
    {
        return await Task.FromResult&amp;lt;TokenCredential&amp;gt;(null);
    }
    return null;
});

ArcGISHttpClientHandler.HttpRequestBegin += (sender, message) =&amp;gt;
{
    if (message.RequestUri.Host == "myhost.com")
    {
        message.Headers.Add(_tokenHeader, _token);
    }
};&lt;/LI-CODE&gt;&lt;P&gt;- For consuming endpoint&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var vectorTiledLayer = new ArcGISVectorTiledLayer(new Uri(url));
map.OperationalLayers.Add(vectorTiledLayer);&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Now let's see waht's url, it's:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;https://myhost.com/api/geoserver/collections/customstyle/style.json?filter=uuid='e3acb89b'&lt;/LI-CODE&gt;&lt;P&gt;let's call it [A], then we got response:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;{{
  "version": 8,
  "name": "customstyle-style",
  "sources": {
    "customstyle": {
      "type": "vector",
      "url": "[B]"
    }
  },
  "layers": [
    {
      "id": "Off",
      "type": "fill",
      "source": "customstyle",
      "source-layer": "customstyle",
      "filter": [
        "all",
        [
          "==",
          "class_id",
          0
        ]
      ],
      "paint": {
        "fill-color": "#E2E2E2",
        "fill-outline-color": "#E2E2E2"
      }
    },
    {
      "id": "On",
      "type": "fill",
      "source": "customstyle",
      "source-layer": "customstyle",
      "filter": [
        "all",
        [
          "==",
          "class_id",
          1
        ]
      ],
      "paint": {
        "fill-color": "#2166AC",
        "fill-outline-color": "#2166AC"
      }
    }
  ]
}}&lt;/LI-CODE&gt;&lt;P&gt;Inside [B] there's URL&lt;/P&gt;&lt;LI-CODE lang="c"&gt;https://myhost.com/api/geoserver/collections/customstyle/tilejson.json?filter=uuid='e3acb89b'&amp;amp;f=json&amp;amp;returnAdvancedSymbols=true&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;which returns&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;{
    "tilejson": "3.0.0",
    "tiles": [
        "[C]"
    ],
    "vector_layers": [
        {
            "id": "customstyle",
            "fields": {
                "gid": "ID",
                "uuid": "Layer uuid",
                "class_id": "Class id"
            }
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Inside [C] there's URL:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;https://myhost.com/api/geoserver/collections/customstyle/tiles/{z}/{x}/{y}?filter=uuid='e3acb89b'&lt;/LI-CODE&gt;&lt;P&gt;which gets: response.mvt, which is our tile for z x y&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 10:14:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1417072#M12657</guid>
      <dc:creator>jm2024</dc:creator>
      <dc:date>2024-05-10T10:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Z,X,Y Vector tiles on Maui .NET project / ArcGISVectorTiledLayer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1417088#M12659</link>
      <description>&lt;P&gt;What service type is your service? Do you have the ArcGIS JSON service descriptor metadata available at that endpoint? Ie what does 'tilesUrl + "?f=json"' return? Or are you using the URL of your vector style sheet?&lt;BR /&gt;&lt;BR /&gt;Also see&amp;nbsp;&lt;A href="https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Mapping.ArcGISVectorTiledLayer.html" target="_blank"&gt;https://developers.arcgis.com/net/api-reference/api/net/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Mapping.ArcGISVectorTiledLayer.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 15:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1417088#M12659</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-04-30T15:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Z,X,Y Vector tiles on Maui .NET project / ArcGISVectorTiledLayer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1418057#M12665</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think, tiles Uri must end with ".pbf":&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/vector-tile.htm" target="_blank"&gt;Vector Tile—ArcGIS REST APIs | ArcGIS Developers&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 13:41:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1418057#M12665</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-05-02T13:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Z,X,Y Vector tiles on Maui .NET project / ArcGISVectorTiledLayer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1418888#M12669</link>
      <description>&lt;P&gt;For the tiles themselves yes, but we need a way to understand the tiles first, and that's where the service metadata comes in.&lt;BR /&gt;&lt;BR /&gt;Here's a good thread on how someone accomplished it:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-render-mapbox-vector-tiles-pbf/td-p/380081" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-it-possible-to-render-mapbox-vector-tiles-pbf/td-p/380081&lt;/A&gt;&lt;BR /&gt;And some more doc on vector tile services:&amp;nbsp;&lt;A href="https://developers.arcgis.com/documentation/mapping-apis-and-services/data-hosting/vector-tile-services/introduction/" target="_blank"&gt;https://developers.arcgis.com/documentation/mapping-apis-and-services/data-hosting/vector-tile-services/introduction/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 18:36:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1418888#M12669</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-05-03T18:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Z,X,Y Vector tiles on Maui .NET project / ArcGISVectorTiledLayer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1429997#M12687</link>
      <description>&lt;P&gt;So - we have endpoint that's working with Mapbox Vector Tiles.&lt;/P&gt;&lt;P&gt;1. I setup authentication (our endpoint needs header with special token), then on Get it returns stuff.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;AuthenticationManager.Current.ChallengeHandler = new ChallengeHandler(async (CredentialRequestInfo info) =&amp;gt;
{
    if (info.ServiceUri.Host == "myhost.com")
    {
        return await Task.FromResult&amp;lt;TokenCredential&amp;gt;(null);
    }
    return null;
});

ArcGISHttpClientHandler.HttpRequestBegin += (sender, message) =&amp;gt;
{
    if (message.RequestUri.Host == "myhost.com")
    {
        message.Headers.Add(_tokenHeader, _token);
    }
};&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;2. I tried following code (naive version that it will just works)&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var vectorTiledLayer = new ArcGISVectorTiledLayer(new Uri(url));
map.OperationalLayers.Add(vectorTiledLayer);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Now what's about our endpoint&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;https://myhost.com/api/geoserver/collections/customstyle/style.json?filter=uuid='e3acb89b'&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;let's call it [A], then we got response&lt;/P&gt;&lt;LI-CODE lang="c"&gt;{{
  "version": 8,
  "name": "customstyle-style",
  "sources": {
    "customstyle": {
      "type": "vector",
      "url": "[B]"
    }
  },
  "layers": [
    {
      "id": "Off",
      "type": "fill",
      "source": "customstyle",
      "source-layer": "customstyle",
      "filter": [
        "all",
        [
          "==",
          "class_id",
          0
        ]
      ],
      "paint": {
        "fill-color": "#E2E2E2",
        "fill-outline-color": "#E2E2E2"
      }
    },
    {
      "id": "On",
      "type": "fill",
      "source": "customstyle",
      "source-layer": "customstyle",
      "filter": [
        "all",
        [
          "==",
          "class_id",
          1
        ]
      ],
      "paint": {
        "fill-color": "#2166AC",
        "fill-outline-color": "#2166AC"
      }
    }
  ]
}}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Inside [B] there's URL&lt;/P&gt;&lt;LI-CODE lang="c"&gt;https://myhost.com/api/geoserver/collections/customstyle/tilejson.json?filter=uuid='e3acb89b'&amp;amp;f=json&amp;amp;returnAdvancedSymbols=true&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;and it returns:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;{
    "tilejson": "3.0.0",
    "tiles": [
        "[C]"
    ],
    "vector_layers": [
        {
            "id": "customstyle",
            "fields": {
                "gid": "ID",
                "uuid": "Layer uuid",
                "class_id": "Class id"
            }
        }
    ]
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Inside [C] there's URL:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;https://myhost.com/api/geoserver/collections/customstyle/tiles/{z}/{x}/{y}?filter=uuid='e3acb89b'&lt;/LI-CODE&gt;&lt;P&gt;which gets: response.mvt, which is our tile for z x y&lt;BR /&gt;&lt;BR /&gt;Now I wonder how exactly I suppose to consume it or if it's not possible in current endpoint setup and we need to enhance our endpoint somehow?&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 09:45:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1429997#M12687</guid>
      <dc:creator>jm2024</dc:creator>
      <dc:date>2024-05-10T09:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Z,X,Y Vector tiles on Maui .NET project / ArcGISVectorTiledLayer</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1430189#M12688</link>
      <description>&lt;P&gt;I've updated my question with providing more information about what's in our endpoint responses.&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 10:15:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/z-x-y-vector-tiles-on-maui-net-project/m-p/1430189#M12688</guid>
      <dc:creator>jm2024</dc:creator>
      <dc:date>2024-05-10T10:15:19Z</dc:date>
    </item>
  </channel>
</rss>

