Astro Mars Images Programm

Google:

function makeMarsMapType(m) {
  var opts = {
    baseUrl: 'https://' + m.location + '/',
    getTileUrl: function(tile, zoom) {
      var bound = Math.pow(2, zoom);
      var x = tile.x;
      var y = tile.y;

      // Don't repeat across y-axis (vertically).
      if (y < 0 || y >= bound) {
        return null;
      }

      // Repeat across x-axis.
      if (x < 0 || x >= bound) {
        x = (x % bound + bound) % bound;
      }

      var qstr = 't';
      for (var z = 0; z < zoom; z++) {
        bound = bound / 2;
        if (y < bound) {
          if (x < bound) {
            qstr += 'q';
          } else {
            qstr += 'r';
            x -= bound;
          }
        } else {
          if (x < bound) {
            qstr += 't';
            y -= bound;
          } else {
            qstr += 's';
            x -= bound;
            y -= bound;
          }
        }
      }
      return 'https://' + m.location + '/' + qstr + '.jpg';
    },
    tileSize: new google.maps.Size(256, 256),
    maxZoom: m.zoomlevels - 1,
    minZoom: 0,
    name: m.name.charAt(0).toUpperCase() + m.name.substr(1)
  };

C++
LPCSTR GetMarsStr(int x, int y, int zoom)
{
double bound = pow(2.0, zoom);
char static qstr[256];
int Index=0;
     qstr[Index++] = 't';
      for (int z = 0; z < zoom; z++) 
  {
        bound = bound / 2;
        if (y < bound) 
{
          if (x < bound) 
  {
            qstr[Index++]= 'q';
          } 
  else 
  {
            qstr[Index++]= 'r';
            x -= bound;
          }
        } 
else 
{
          if (x < bound) 
  {
            qstr[Index++]= 't';
            y -= bound;
          } 
  else 
  {
            qstr[Index++]= 's';
            x -= bound;
            y -= bound;
          }
        }
  }
  return qstr;
}

Другая около астрономическая информация на разные темы https://finderbmap.blogspot.com/

Комментариев нет:

Отправить комментарий

  Знаменитый вор-джельтемен Арсен Люпан арестован ! Камера наблюдения ювелирного магазина на рю Риволи зафиксировала во время ограбления хар...