Displaying posts tagged: javascript

Decrypted JSON data not being decoded properly

No Comments

Summary: The decrypted string was was null-padded. These null bytes are not handled by the jsondecode function. It is easily solved by running $string = rtrim($string, “\x00”); before decoding.

Google Maps API: Encoding a polyline from a GDirection object

11 Comments

Goal: To save the encoded string corresponding to the GPolyline of a GDirections object, so that I can easily load the same path in the future without hammering GDirections.

GSIV and the Python Imaging Library dying on large image

No Comments

Summary: The GSIV tilemaker.py script dies when attempting to create a large (16384x16384) blank PIL Image object, simply saying “Killed”. The only solution I’ve found is to resize the image to below 8192x8192 before running the script.