The place name of the location is not displayed correctly.

Hello, since some time (I don't know, maybe it's a new update) the name of the place is not displayed correctly. It doesn't match the actual place where I am.

I am attaching my code here and if I may ask someone please tell me what I am doing wrong?

function drawLocation(dc) {
var x = $.SCREEN_WIDTH / 2 + 24, y = 76;


var observationLocationName = Weather.getCurrentConditions().observationLocationName;
observationLocationName = observationLocationName == null ? "--------" : observationLocationName;
var comm = observationLocationName.find(",");
observationLocationName = observationLocationName.substring(0, comm == null || comm > 14 ? 14 : comm);

dc.setColor($.colorLocation, Graphics.COLOR_TRANSPARENT);
dc.drawText(x, y, $.fontSmall, observationLocationName, Graphics.TEXT_JUSTIFY_CENTER);
 }
}

Thank you

  • Tested in SIM form:

    System.println(Weather.getCurrentConditions().observationLocationPosition.toDegrees());

    and the GPS location is different from the actual location where I live.

  • check on device (not println only dc.drawText(...) on screen)

    on sim it from sim conf but you can put your location in settings and see what sdk returns

  • You need to do this on your actual device and not the sim.  By default the sim uses the location of Garmin HQ in Olathe Kansas.  Settings>Weather Data in the sim:

  • So I compared it and the GPS coordinates on the watch (draw) show something different than google maps or OWM at the address where I live, other repair options?

  • put this code in yours and run on device and attach photo of watch

        using Toybox.Graphics               as  GRA;
        using Toybox.Weather                as WEA;

        function onUpdate(dc)
        {
            var
            locName = null,
            locGPS  = null;
            
            if(Toybox has :Weather)
            {
                var cc = WEA.getCurrentConditions();
                if(cc)
                {
                    locName = cc.observationLocationName;
                    cc        = cc.observationLocationPosition;
                    if(cc)
                    {
                        locGPS = cc.toDegrees();
                    }
                }
            }
            dc.setColor(-1, 0);
            dc.clear();
            dc.setColor(0xFFFFFF, 0);
            dc.drawText(
                dc.getWidth()/2,
                dc.getHeight()/2,
                11,
                (locName ? locName : "---") + "\n" +
                (locGPS ? locGPS : "---"),
                5);
        }

    on sim it looks

  • To add to OP's concerns about the location observation name, my watch face also uses garmin weather only and I've been using it daily for more than a year now, always showing the observation name. Since last update on my venu 2s, the observation name changed to a place that is about 10km from the previous one, so indeed showing a different location than what it had shown all this time. It's now showing the airport and previously it has always shown the actual city name. 

    I've also been receiving feedback from users recently (starting about a month ago) saying that the location name has changed and is showing a "wrong" name, which is usually 10-20km away from their actual location name. Those feedbacks are not only from Venu users, but also from Fenix and Forerunner watches and started in November 16th (first user feedback that I had on this issue).