This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
How to pull out line/poly data from VectorTileDataEmitter #2315
Unanswered
brent-williams
asked this question in
Q&A
Replies: 1 comment
-
@brent-williams, thanks for the request. The communication between the web-worker / main thread happens with the DecodedTile interface, so, you just need to adjust that and add what you want to export. If you want to do anything special, then you may need to hack in VectorTileDataEmitter, however maybe the existing implementation is enough. You mention you want to do labelling with a polyline, we have for example an interface: TextPathGeometry, maybe take a look at that. Reach out if you have any more questions, more than happy to help. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Harp folks, I have working code mods to VectorTileDataEmitter.processLineFeature/processPolygonFeature in order to pull out projected line/polys for processing on the main thread (labeling mainly). However this only works if with a non-webworker DataSource (i.e. one with decoder: new VectorTileDecoder()). If the VectorTileDataEmitter is a webworker as would be the normal case then it can't make calls into the main thread.
Can you advise on how I might access project line/poly data while taking advantage of the webworker code? If I stick with my current approach I'll presumably need to get familiar with harp.gl webworkers in order to postMessage() up to my main thread. Alternatively is there some more standard harp.gl method to gain access to projected line/poly data than hacking around deep in VectorTileDataEmitter()? Any pointers appreciated.
Beta Was this translation helpful? Give feedback.
All reactions