0

i need some advise on how do i create Creating Custom Panorama Tiles for creating the custom street view

i am able to create equirectange panorama of 10000x5000 but i saw that i need to slice them into tiles.

i am also confuse over how should i label them.

[return 'images/panoReception1024-' + zoom + '-' + tileX + '-' +tileY +'.jpg']

this is the example i got from the google street view document help.

but , assume i have a 3000x1500, and i set the tile size to 512, i need to create 12X6? am i right?

then how do i create the different zoom level?

  1. Zoom 0 is the original file?

  2. Zoom 1/2/3/4, how do i create the tiles for them and how do i label them?

hope can get some advise

thank u for reading and helping

Cheers.

2 Answers 2

1

I don't know if you've found an answer, yet.

Essentially, you have to break the panorama pic into 8 columns and 4 rows.

So the top row from left to right would be:
panoReception-0-0.jpg, panoReception-1-0.jpg,...,panoReception-8-0.jpg

The second row from left to right would be:
panoReception-0-1.jpg, panoReception-1-1.jpg,...,panoReception-8-1.jpg

I found full instructions on this website: http://googlemaps.googlermania.com/google_maps_api_v3/en/custom_streetview/3.html

1
  • Ideally the tiles should be of dimensions: 256 x 256 pixels
  • Resize your panoramic to this size: 8192 x 4096 pixels
  • The images get loaded as a pyramid, at various zoom levels
  • The zoom levels are 0,1,2,3,4. Optionally you may also use a level 5.

      
        var heightY = Math.pow(2, zoom - 1);
        var widthX = 2 * heightY;
      
    
  • The above JavaScript code shows the image dimensions at various pyramid (zoom) levels

  • Loop your code to slice images. Following is your counter for x and y axis.

      
        var xCount = widthX / 256;
        var yCount = heightY / 256;
      
    
  • The tile format is pano_z_x_y.jpeg, where z is zoom. x is horizontal count, and y is vertical count for the required tile image

  • At zoom 0, you get single image pano_0_0_0.jpeg
  • At zoom 1, you get two images pano_1_0_0.jpeg & pano_1_1_0.jpeg
  • At zoom 2, you get 8 images
  • At zoom 3, you get 32 images
  • At zoom 4, you get 128 images

Pass over these images to your JavaScript function as below:

function getCustomPanoramaTileUrl(pano, zoom, tileX, tileY) 
{
      return 'pano' + '_' + zoom + '_' + tileX + '_' + tileY + '.jpeg';
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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