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

Update marker location wrt socket events

$
0
0

@sathwikbairaboina wrote:

i can’t listen socket evet (mechloc),plz help me,atleast if any one could give me a way to refer native maps marker that would solve my problem

showmechloc(loc1:LatLng){
let that=this;

    this.map.addMarker({
      title: 'mechanic location',
      icon: 'blue',
      animation: 'DROP',
      position: loc1
    })
    .then(marker => {


      marker.on(GoogleMapsEvent.MARKER_CLICK)
      .subscribe(() => {

        that.socket.on('mechloc', function(data) {

          marker.setPosition(data.latlng);
          alert('mechloc');
     });

});

      });


  }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



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