I have almost finished moving my 2000+ line app to Blynk IOT but have come across an incompatibility with the Map widget that’s key to my device. The call I used in my legacy Blynk app is:
Blynk.virtualWrite(V7, markerNum, latI, lonI, pmLabel, newColor); // update marker position=GPS, label = sensor value, color=PMAQI value (marker color hack for iOS)
For Blynk IOT I am using what you suggest above, which seems to work as far as basically placing a marker on the map at the correct lat and lon:
Blynk.virtualWrite(V7, lonI, latI); // for Blynk IOT
Question: will we see the missing functions - number, label, color - added to Map? They really are key to making a commercial-looking (as Apple, Google or other moving map app would do) tracking app. Thanks for a superb new Blynk!
Here’s what my app looks like under old Blynk:
EDIT 1: Although the black marker appears to be drawn at the correct location on the Map, it doesn’t persist. That is, every time I make the Blynk.virtualWrite
call it only moves the marker to the new location without leaving the previous marker to show the location of the last location (see image above.) Is this the intended function of the new Map widget or am I missing something? I seem to recall running into this with the old Blynk when I didn’t properly increment the “index” value. As there seems to be no such variable in the new Blynk (call is apparently Blynk.virtualWrite(V7, lonI, latI);
, I am wondering if there is a similar problem with overwriting instead of persisting as is needed for a proper tracking app. Seems like this was working a few weeks ago?? Can we not just restore this widget to what was an excellent function in old Blynk? Ideas?
EDIT 2: The MyMAP widget from old Blynk seems to be missing another key function - clear. My code:
WidgetMap myMap(V7); // set up Map widget on Blynk
...
// This function is called whenever "erase markers" button on Map is pressed
BLYNK_WRITE(V40) {
if (param.asInt()) {
myMap.clear(); // erase any marker(s)
Serial.print("Map GPS markers erased!");
}
}
When I press the Blynk button linked to V40 my previously placed markers remain visible on the map. Thoughts? Thanks!