Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Marker on click show alert ionic 4 googlemap angular

$
0
0

@inesS8 wrote:

  private addMaker(lat: number, lng: number) {
    const marker = new google.maps.Marker({
      position: { lat, lng },
      map: this.mapRef,
      title: 'test',
      icon: { url: "../assets/icon/car.png",
      scaledSize: new google.maps.Size(35, 35) },   
      }) 

    //Marker + infowindow + alert[quote="AhmadAlMunajjed, post:1, topic:159682, full:true"]
What is the difference between the two types of ionic 4 project: angular and ionic-angular?
[/quote]


    var contentString = "Click me!";
    var infowindow = new google.maps.InfoWindow({
      content: contentString
       });

    google.maps.event.addListener(marker, 'click', function() {
      infowindow.open(Map,marker);

      // show alert don't work !!!
      this.presentAlert();
      }
     );
   

 

  }
  

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>