BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Map widget is displaying wrong location

(upload://fy45otAX2hGn8AMtW7WJJfZwWof.jpeg)

my gps location was exactly right ( i verified with google map ).
the values that i am posting to BLYNK is in float

myMap.location(1,**flat**, **flon**, "gps location");
int x =flat;
int y = flon;
Blynk.virtualWrite(V2,x);  // this is for verification 
Blynk.virtualWrite(V3,y);  // this is for verification 

i verified that the data is posting to the blynk was correct by using V2 and V3 virtual pins.

i figured out that if i changed the value in myMap.location(1,flat, flon, “gps location”);

the coordinates in the map are changing respectively .

i am using ios - > 12.4

additional information from debug monitor

my screen shot from phone :

Your Map Widget is NOT getting ANY data… that shown geographical location is basically Lat 0, Lon 0

Probably because…

… is integers, not floats, or because your map command comes BEFORE the value declaration? EDIT actually it looks like your code snippet is showing another float to int conversion… totally unnecessary, just confirm the Map data by sending the EXACT same float values to a display widget.

PS, showing ALL the code makes for an easier chance that we can assist :wink:

1 Like