Custom VectorTileLayer Does not render sprite symbols

475
2
02-01-2022 06:13 AM
StephenSontag55
New Contributor II

Using Arcgis JS 4+, Vector tile symbols are not rendering because the Sprite files never get called.

Type Circle, Lines and Polygons work fine because it doesn't use the sprites but symbols with the same point data does not render any symbols.

 

const tiledLayerTest = new VectorTileLayer({styleobject})    

    "sprite": "https://cdn.arcgis.com/sharing/rest/content/items/30d6b8271e1849cd9c3042060001f425/resources/sprites/",
    "glyphs": "https://basemaps-api.arcgis.com/arcgis/rest/services/OpenStreetMap_v2/VectorTileServer/resources/fonts/{fontstack}/{range}.pbf",
    style: {
      layers: [
        id: 'layerid',
        source: 'layerid',
        'source-layer': 'layerid',
        type:'symbol',
        layout: {
          "icon-image": "Road/Shield white black/6",
          'symbol-placement': 'point',
          'text-font': ['Arial Regular'],
          'icon-size': 60,
        }
        spaint: {
          color: style.color,
        }],
      sources: {
        [layerid]: {
          type: 'vector',
          minzoom: maxscale || 12,
          url: '/v1/layers/' + layerid,
          tiles: [
             '/{level}/{col}/{row}',
          ],
        },
      },
    },

 

 

 

 

 

 

0 Kudos
2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

Sprites does work in 4.x. I am not sure how to reproduce the issue with code provided as it is not complete. I can take a look at it if you provide a reproducible case. 

 

Thanks,

0 Kudos
StephenSontag55
New Contributor II

Thanks.  Tough to send over the Vector tile source since it's behind some authentication.

Just trying to figure out why the sprite file never gets called.  When I turn type: 'circle', points show up.  But when I do type: 'symbol', the sprite files are never requested.  I figured if you define type: 'symbol' the sprite would get called.

0 Kudos