OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

AdvancedMarkerElement not showing in any type of modal

  • Thread starter Thread starter Carlos Sanchez Acero
  • Start date Start date
C

Carlos Sanchez Acero

Guest
Code:
const { Map } = await google.maps.importLibrary('maps') as google.maps.MapsLibrary
  const center = new google.maps.LatLng(43.2955357,-2.8849016)
  mapInstance.value = new Map(elMap,{
    zoom: 16,
    mapId: 'DEMO_MAP_ID',
    center,
    disableDefaultUI: true
  })

  const marker = new markerLibrary!.AdvancedMarkerElement({
    position: center,
    map: mapInstance.value,
    //zIndex: 99999999,
  })

  /* 
   /* success but this is deprecated
   new markerLibrary.Marker({
    map: mapInstance.value,
    position: center
  })  */

not throwing error display in console browser. outside of modal it's work correctly

I'm try deprecated metod of .Marker() and work correctly

<pre><code>const { Map } = await google.maps.importLibrary('maps') as google.maps.MapsLibrary
const center = new google.maps.LatLng(43.2955357,-2.8849016)
mapInstance.value = new Map(elMap,{
zoom: 16,
mapId: 'DEMO_MAP_ID',
center,
disableDefaultUI: true
})

const marker = new markerLibrary!.AdvancedMarkerElement({
position: center,
map: mapInstance.value,
//zIndex: 99999999,
})

/*
/* success but this is deprecated
new markerLibrary.Marker({
map: mapInstance.value,
position: center
}) */

</code></pre>
<p>not throwing error display in console browser. outside of modal it's work correctly</p>
<p>I'm try deprecated metod of .Marker() and work correctly</p>
 

Latest posts

Top