in API

Fix: Incorrect Google Street View Image

In developing my iOS application “Nourish,” I utilized static Google street-view images to show the front view of each location. Problem is, using the latitude and longitude of the location meant that sometimes that image was displaying down the street, or across the street (or in one instance, the sky). As someone that obsesses over the little details, this would not fly for me.

After further investigation I found that the panoramic camera on the roof of the street view cars rotates while it captures these images. Instead of messing with the parameters for point of view, pitch, and heading for my static link (which would further complicate my algorithm as well), I simply adjusted each latitude and longitude. Imagine walking 20 feet in a different direction and you would find that your view perspective is different, and the street-view car is likely capturing your location’s image from that position instead.

For example:
Using the latitude and longitude for the location yielded this street-view image (not helpful):

After changing the latitude and longitude to 47,612188,-122.319081, which is the font of the location (very helpful):

Related Posts

Written By: