POST
|
That json looks weird. You have a mixture of single quotes, double quotes and no quotes at all, and a property called spaint. Perhaps get all that fixed up. But I think your issue is that the "sprite" property should be the path to the sprite file itself, minus the extension, not a folder path. See https://docs.mapbox.com/mapbox-gl-js/style-spec/sprite/#loading-sprite-files
... View more
02-01-2022
03:15 PM
|
0
|
1
|
556
|
POST
|
Yes. Perhaps check that your sprite.json and sprite.png (and the sprite@2x variants) are downloading correctly and that the sprite.json correctly maps from icon-image to a chunk of the png.
... View more
01-31-2022
04:55 PM
|
0
|
3
|
2569
|
POST
|
I have encountered the same problem. I ended up by creating separate symbol layers (one for each line layer) containing my line center-points and putting my symbols in those. Since some of the symbols were arrows that I wanted to be oriented along the line, I also had to compute the orientation of the relevant line segments and add these as rotation properties for my symbols. All a bit painful. ArcGIS JS styles conform to the Mapbox style spec, but that does not mean that all of the spec is supported (not even Mapbox support all of the spec). In particular, expressions for data values and filters are not supported. Instead, you have to use the old (deprecated) filter and function syntax.
... View more
01-22-2020
11:09 PM
|
0
|
0
|
1092
|
POST
|
Yes, although we generate the tiles on the fly using our own code and database, not PostGIS, and we use a pbf extension rather than mvt (the file format is the same). The key is the "chunk of json" in my previous reply, which the ArcGIS JS API expects to find at the URL specified as the source URL in your style. We are using 4.12 so I don't know if it would work for 3.X.
... View more
10-01-2019
05:35 PM
|
0
|
1
|
3464
|
POST
|
I don't know what PBF-formatted data ESRI support other than vector tiles and fontstacks. We implemented PBF tile generation by following the MapBox spec (https://docs.mapbox.com/vector-tiles/specification/ and https://github.com/mapbox/vector-tile-spec/blob/master/2.1/vector_tile.proto) and I believe (I didn't implement it myself) taking inspiration from https://github.com/mapbox/vt-pbf. The actual implementation was done in C++ using Google's Protocol Buffers library (https://developers.google.com/protocol-buffers/docs/reference/cpp)
... View more
09-23-2019
10:52 PM
|
1
|
14
|
6821
|
POST
|
We are doing pretty much exactly this using 4.12. We start with the style json, which comes from our server but could equally well be created on the client. It looks something like: { "version": 8, "sources": { "oursource": { "type": "vector", "url": "https://ourhost/oursource" } }, "sprite": "https://ourhost/sprite", "glyphs": "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/resources/fonts/{fontstack}/{range}.pbf", "layers": [ { ... } ] We create our vector tile layer using this style and add it it to the map: map.add(new VectorTileLayer({style: ourstyle})); The source url (https://ourhost/oursource) needs to return a chunk of json that looks like an ArcGIS vector tile service. We serve up something like this: { "name": "OurName", "capabilities": "TilesOnly", "type": "indexedVector", "tiles": [ "/{z}/{x}/{y}.pbf" ], "fullExtent": { "xmin": -20037507.067161845, "ymin": -20037507.067161845, "xmax": 20037507.067161845, "ymax": 20037507.067161845 }, "minScale": 591657527.591555, "maxScale": 70.5310735, "tileInfo": { "rows": 512, "cols": 512, "dpi": 96, "format": "pbf", "origin": { "x": -20037508.342787, "y": 20037508.342787 }, "spatialReference": { "wkid": 102100, "latestWkid": 3857 }, "lods": [ { "level": 0, "resolution": 78271.516964, "scale": 295828763.79577729 }, { "level": 1, "resolution": 39135.75850391389, "scale": 147914381.98071263 }, ....... { "level": 20, "resolution": 0.07464553627067128, "scale": 282.1242972457275 } ] } } I have omitted most of the lods but you can find them online. Possibly you could omit the tileinfo part and instead create a tileinfo using the TileInfo.create method (TileInfo | ArcGIS API for JavaScript 4.12) and then set the tileinfo property of the VectorTileLayer directly - I haven't tried this. Note that a 512x512 pixel tile is specified, which is the MapBox standard. You now need to serve your actual (pbf) tiles using the url pattern specified. In this example, that would be https://ourhost/oursource/{z}/{x}/{y}.pbf. You also need to serve sprite.png and sprite.json and their high-res variants, sprite@2x.png and sprite@2x.json
... View more
09-23-2019
09:48 PM
|
0
|
4
|
3464
|
Title | Kudos | Posted |
---|---|---|
1 | 09-23-2019 10:52 PM |
Online Status |
Offline
|
Date Last Visited |
02-02-2022
11:12 PM
|