vue-google-maps icon indicating copy to clipboard operation
vue-google-maps copied to clipboard

Ground / Custom Overlays

Open rrd108 opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. It would be nice to have the possibility to use ground / custom overlays.

Describe the solution you'd like If we can create a new map object we can attach the overlay to that.

Describe alternatives you've considered No alternative I think

Additional context Here is what I want to use: https://developers.google.com/maps/documentation/javascript/groundoverlays?hl=en

rrd108 avatar May 31 '22 11:05 rrd108

I found out how to do it. mapRef is the ref of the GMapMap

onMounted(() => {
    mapRef.value
      .$gmapApiPromiseLazy()
      .then(() => {
        const groundOverlay = new google.maps.GroundOverlay(
          'https://storage.googleapis.com/geo-devrel-public-buckets/newark_nj_1922-661x516.jpeg',
          {
            east: 17.703271508054467,
            north: 46.573320157456465,
            south: 46.56439415563869,
            west: 17.687189407348647,
          }
        )
        groundOverlay.setMap(mapRef.value?.$mapObject)
      })
      .catch(err => console.error(err))
  })

rrd108 avatar Jun 06 '22 14:06 rrd108