Map not scrolling, auto centering, following the pin... etc

Over the past few months, this has been hinted and commented on before, and while I am fascinated with GPS projects, I never go anywhere to actually use them :blush: so I just let it go…

However, I just realised I have had a test routine running for another users issue, that I totally forgot about :stuck_out_tongue:

My map pin has been doing a constant polar orbit for days now, without my noticing… primarily as the map itself hasn’t budged.

Any Android device I have… multiple versions from 4.4.4 to 8.0
App 2.25.1
Library 0.5.3
Local Server 0.37.3
Map at default zoom setting

Hitting the icon in the upper right will center the pin, but the map stays locked in that position from then on until next press.

Please show how do you send data to the map.

Well… this time I was I was testing this users code… minus the extra display widgets.

void sendToBlynk(){
float lat = 51.507351;
float lon = -0.127758;
int index = 1;
  myMap.location(index,(lat+counter/10000.0),lon,String(lat+counter/10000.0,6));
    counter++; 
}

But is the same issue with different code on my RPi with NodeJS. As in the pin moves, but the map will not automatically center on new pin, or groups of pins.

// ----- Map pin -----
var mapButton = new blynk.VirtualPin(15);  // Button Widget for Map
var mymap = new blynk.WidgetMAP(14);  // Setup Map Widget

mapButton.on('write', function(param) {  // Watches for virtual map button
  if (param == 0) {  // If Button OFF
	//mymap.clear();
    mymap.location(0, 0, 0, "Nowhere");
    term.write('Map OFF' + '\n\n');
    } else if (param == 1) {  // If Button ON
	mymap.location(0, latitude, longitude, "Me Here Now");  // pulled from the phones position
    term.write('Placing Map Pin' + '\n');
    term.write('Lat: ' + latitude + '   Lon: ' + longitude + '\n\n');
}
});

I get the exact same result with a standard Blynk.virtualWrite()

Blynk.virtualWrite(V65, index, (lat+mapCounter/10000.0), lon, String(lat+mapCounter/10000.0,6));

Any feedback?

Well, at least the zoom to group button still works :stuck_out_tongue: But it you want to track a moving object, you have to manually tap that button… although a few past posts indicate that auto scrolling to next placed pin is how it should work… but nothing confirming one way or another from the peanut gallery yet :cricket::cricket::cricket:

Hm, I’m not sure we have this moving to the pin updated location option. I’ll check

Thank you for looking into this… It has been mentioned as a feature a few times, but so far as I can find, only with iOS?.. Apparently iOS also has satellite view? What happened to Android “supremacy” here :stuck_out_tongue_winking_eye:

As we get more users for map widget, we can definitely extend it’s functionality.

What can be added:

  • choose pin to follow
  • record gps track
  • geofencing
  • your ideas
1 Like

We had that option before, but we disabled it, I currently do not remember due to what the reason we disabled it. I’ll check and maybe return it in nearest releases.

Thanks, I thought I had seen it work before… just had no proof. Not as forgetful as I tho… what was I saying?

It does seem an important feature… tracking a mobile device, having map referenced alerts zoom over to or in/out to include new locations with wide flung IoT infrastructure, etc.

1 Like