The example code provides a Javascript implementation of generating a bounding box for a given lat/lng. This is a refactoring of Python code taken from a StackOverflow answer [here])(https://stackoverflow.com/questions/238260/how-to-calculate-the-bounding-box-for-a-given-lat-lng-location)
This example code adds some custom methods to generate images using ArcGIS services.