I am using TileStache to serve vector tiles from Postgres and using Tangram to display these tiles by passing urlhttp://localhost:8080/composite/{z}/{x}/{y}.json in the data source. The response i get is in JSON format, which is what i wanted.

Now i just want to encrypt the JSON response so that it is not human readable at the client end and readable at server end but i don't know how to do it.

Can anyone help please?


This might be helpful for your problem as it was really helpful for me once when I was doing JSON encryption.

| improve this answer | |

You should use the transform property on the source element to do your decryption.

documentation: https://mapzen.com/documentation/tangram/sources/#transform

| improve this answer | |

You can't

Since the mapping library you're using is taking JSON as an input, and it is client-side, any data used by Tangram is necessarily human-readable client-side.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.