Closed jjw00d closed 1 year ago
@jjw00d hey there! Glad you're enjoying tegola. Looking at your issue here, the problem is that the MVT spec does not support JSON like you're trying to use it here.
Can you help me understand a bit more what you're trying to achieve? For example, do you need the cables
and voltage
attributes for cartographic purposes, or will these attributes be displayed in a data view when the user interacts with the feature? If the latter, you might be able to encode the JSON as a string in the MVT and then decode the JSON client side.
Aha - that's interesting - I'll go peruse it - would be good to read up.
Yep, all I'm trying to achieve is to display the attributes in a data view when the user interacts. I can definitely decode them client side - my thought was I shouldn't need to but it looks like I was wrong. Thank you
@jjw00d We have a link to the spec in the README. Here's a link for reference: https://github.com/mapbox/vector-tile-spec
Tegola is cool! Good work, really enjoyed using it so far
I'm using an MVT layer and selecting properties of the data - which I then show in a popover when inspecting items on the map. I'm having some issues with the data types of things returned
I'm selecting my layer like this:
But both the cables and voltage properties are returned as string array properties when the pbf is decoded![image](https://user-images.githubusercontent.com/103217542/227925895-0598af2e-421f-45f0-bd98-f1e684ac8271.png)
For numeric properties of the data - they are correctly decoded as numbers... So i'm not sure what's going on here - or why the data wouldn't be coming through as an array. Is this expected?
(To produce the screen shot above I'm using a Deck.gl MVT layer and reading the data before rendering a geojson layer)