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

Marker estatic and Map Native

$
0
0

@MoreFlores wrote:

Hi, I need to know how you could do this?
please help

This is what I’m trying but nothing

 markersPartida() {
    this.geolocation.getCurrentPosition().then(response => {
      let latitude = response.coords.latitude;
      let longitud = response.coords.longitude;
      this.map.addMarker({
        'position': {
          lat: latitude,
          lng: longitud
        },
        'icon': 'assets/imgs/markersPartida.png',
        'draggable': true,
      }).then(marker => {
        this.map.on(GoogleMapsEvent.MAP_DRAG_END)
          .subscribe(() => {
            marker.on(GoogleMapsEvent.MARKER_DRAG_END)
              .subscribe(() => {
                console.log("Me estoy moviendo :D");
                console.log(marker.getPosition());
                marker
              });
          });
      });
    })
      .catch(error => {
        console.log(error);
      })
  }

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>