Elements on top of map google maps (Native) Ionic 2

3

When placing an HTML element on top of the Google Maps using Ionic 2, I can not click on those elements, it's as if the element is not there and the click is on the map.

    
asked by Antonio Sierra Hurtado 02.03.2017 в 00:53
source

1 answer

1

If you add the map by typescript, it is generated later. I recently had to make a map inside a slide and in the end we opted for the api of static maps of Google Maps because when you click on the slide the map was moved and it was uncomfortable.

code that was discarded:

 <ion-slide >
      <ion-card-content>
        <ion-grid>
          <ion-row>
            <ion-col col-2></ion-col>
            <ion-col col-8 (click)="onClickedItem()">Ruta</ion-col>
            <ion-col col-2></ion-col>
          </ion-row>
        </ion-grid>
          <button ion-item (click)="onClickedItem()">
            Mi Ruta
          </button>
          <ion-item ><div #map id="map2"></div></ion-item>
      </ion-card-content>
    </ion-slide>

If you put the code I can help you better.

    
answered by 10.05.2018 в 20:14