Using the map with js library

@Pavlo

I did it!!

I added this to the blynk.js in the blynk-library

this.WidgetMAP = function(vPin) {
    this.pin = vPin;
    this.location = function(index, lat, lon, value) {
      var info = [index, lat, lon, value] 
      self.virtualWrite(this.pin, info);
    }
  };

And can now use this to post to the MAP component:

var mymap = new blynk.WidgetMAP(16);
mymap.location(51,  lat, lon, "GPS");

So issue solved!
I’m going to try to add a pull request to the js library

2 Likes