Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8813119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:45:54+00:00 2026-06-14T03:45:54+00:00

My goal is to use the Google Street View API to display a full

  • 0

My goal is to use the Google Street View API to display a full pledged panorama scrollable street view image to the user. Basically the API provides me with many images where I can vary the direction, height, zoom, location etc. I can retrieve all these and hope to stitch them together and view it. The first question is, do you know any resources that demoes this full google street view demo working? Where a user can swipe around to move street view around, just like in that old iOS 5 Map Street View thing that I am sure we all miss…

If not, I will be basically downloading hundreds of photos that differ in vertical and horizontal direction. Is there a library or API or resource or method where I can stitch all these photos together to make a big panorama and make it so the user can swipe to view the big panorama on the tiny iPhone screen?

Thanks to everyone!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:45:55+00:00Added an answer on June 14, 2026 at 3:45 am

    I threw together a quick implementation to do a lot of this as a demo for you. There are some excellent open source libraries out there that make an amateur version of StreetView very simple. You can check out my demo on GitHub: https://github.com/ocrickard/StreetViewDemo

    You can use the heading and pitch parameters from the Google StreetView API to generate tiles. These tiles could be arranged in a UIScrollView as both Bilal and Geraud.ch suggest. However, I really like the JCTiledScrollView because it contains a pretty nice annotation system for adding pins on top of the images like Google does, and its datasource/delegate structure makes for some very straight forward image handling.

    The meaty parts of my implementation follow:

    - (UIImage *)tiledScrollView:(JCTiledScrollView *)scrollView imageForRow:(NSInteger)row column:(NSInteger)column scale:(NSInteger)scale
    {
        float fov = 45.f / scale;
    
        float heading = fmodf(column*fov, 360.f);
        float pitch = (scale - row)*fov;
    
        if(lastRequestDate) {
            while(fabsf([lastRequestDate timeIntervalSinceNow]) < 0.1f) {
                //continue only if the time interval is greater than 0.1 seconds
            }
        }
    
        lastRequestDate = [NSDate date];
    
        int resolution = (scale > 1.f) ? 640 : 200;
    
        NSString *path = [NSString stringWithFormat:@"http://maps.googleapis.com/maps/api/streetview?size=%dx%d&location=40.720032,-73.988354&fov=%f&heading=%f&pitch=%f&sensor=false", resolution, resolution, fov, heading, pitch];
        NSError *error = nil;
        NSData *data = [NSData dataWithContentsOfURL:[NSURL URLWithString:path] options:0 error:&error];
        if(error) {
            NSLog(@"Error downloading image:%@", error);
        }
        UIImage *image = [UIImage imageWithData:data];
    
        //Distort image using GPUImage
        {
            //This is where you should try to transform the image.  I messed around
            //with the math for awhile, and couldn't get it.  Therefore, this is left
            //as an exercise for the reader... :)
    
            /*
            GPUImagePicture *stillImageSource = [[GPUImagePicture alloc] initWithImage:image];
            GPUImageTransformFilter *stillImageFilter = [[GPUImageTransformFilter alloc] init];
            [stillImageFilter forceProcessingAtSize:image.size];
    
            //This is actually based on some math, but doesn't work...
            //float xOffset = 200.f;
    
            //CATransform3D transform = [ViewController rectToQuad:CGRectMake(0, 0, image.size.width, image.size.height) quadTLX:-xOffset quadTLY:0 quadTRX:(image.size.width+xOffset) quadTRY:0.f quadBLX:0.f quadBLY:image.size.height quadBRX:image.size.width quadBRY:image.size.height];
            //[(GPUImageTransformFilter *)stillImageFilter setTransform3D:transform];
    
            //This is me playing guess and check...
            CATransform3D transform = CATransform3DIdentity;
            transform.m34 = fabsf(pitch) / 60.f * 0.3f;
    
            transform = CATransform3DRotate(transform, pitch*M_PI/180.f, 1.f, 0.f, 0.f);
            transform = CATransform3DScale(transform, 1.f/cosf(pitch*M_PI/180.f), sinf(pitch*M_PI/180.f) + 1.f, 1.f);
            transform = CATransform3DTranslate(transform, 0.f, 0.1f * sinf(pitch*M_PI/180.f), 0.f);
    
            [stillImageFilter setTransform3D:transform];
    
    
            [stillImageSource addTarget:stillImageFilter];
            [stillImageFilter prepareForImageCapture];
            [stillImageSource processImage];
    
            image = [stillImageFilter imageFromCurrentlyProcessedOutput];
             */
        }
    
        return image;
    }
    

    Now, in order to get the full 360 degree, infinite scrolling effect Google has, you would have to do some trickery in the observeValueForKeyPath method where you observe the contentOffset of the UIScrollView. I’ve started implementing this, but did not finish it. The idea is that when the user reaches either the left or right side of the view, the contentOffset property of the scrollView is pushed to the opposite side of the scrollView. If you can get the content to align properly, and you set up the contentSize just right, this should work.

    Finally, I should note that the Google StreetView system has a limit of 10 images/second, so you have to throttle your requests or the IP address of the device will be blacklisted for a certain amount of time (my home internet is now blacked out from StreetView requests for the next few hours ’cause I didn’t understand this at first).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The project has a goal: use interface centric design. Basically we declare classes of
Goal To use a CREATE TYPE statement in HSQLDB 2.0.0 to create a user-defined
I need to match a URL in google analytics for use in a goal
My goal is to simply use a pop-up box to ask the user for
My goal is to understand every single bit of the following example: http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager I
I'm using google places and jquery to achieve the goal of once the user
Goal: Display a custom location list on google maps based on the location of
My goal is to use the result of an MD5 result to index a
My goal is to use a script that will install an executable file on
I've recently compiled Clang and LLVM on Windows. My goal is to use it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.