Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

333
Visualizações
Unable to overlay an image on google maps

I am currently trying to overlay an image on google maps. By far, I was successful in getting that image on the google maps but it wasn't on the correct position.

I have co-ordinates (lat-longs) of the image where I want it to be overlaid on the map.

I tried to place it using the google map tiles methodology. For it to be displayed as tile I named it "image_name_zoom_x_y.png". So when you select a specific zoom level ( I used 18 ) the image is displayed on a tile but it is displayed on wrong location (tile).

How to match the tile's x, y co-ordinates with the image's latitude and longitude so that I would be able to place the image on the correct location?

This is where I got so far:

const TILE_URL = 'xyz.com/orthoImage_{z}_{x}_{y}.png';

const imageMapType = new google.maps.ImageMapType({
    getTileUrl: function (coord, zoom) {
        console.log(coord);
        const url = TILE_URL
            .replace('{z}', zoom)
            .replace('{x}', coord.x)
            .replace('{y}', coord.y);
        console.log('url', url);
        return url;
    },
    tileSize: new google.maps.Size(256, 256),
    minZoom: 1,
    maxZoom: 20
});
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I think you should look at this , this is something you probably need

https://developers.google.com/maps/documentation/javascript/groundoverlays#introduction

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda