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

  • The lat/lon you get with Garmin Weather maps to the location name.  I did tests when Garmin Weather was first available in CIQ,

    While that seems to always be correct for me (I can go 20 mines from home) and withing 20 minutes (with Android) the location name is correct for my new location (with use phone location for weather in GCM)

  • for my code i don't use OWM but garmin weather which i have set in GCM as phone position.

    All other data in the system widget is the same, but the location is not.

    When I turn on google maps and search for my location, it is different from what the watch shows.

  • All other data in the system widget is the same, but the location is not.

    gps location or location name?

  • I mean location name.

    Where I live

  • Name of location isn't a valid place but it is only information from sdk you have (and probably the same information is displayed on widget on watch that does it). So you can

    - report bug

    - start to use other service that return good data.

    BTW. Have you checked gps from getCurrentConditions().observationLocationPosition? Is it correct?

  • I'm getting lost in it now.

    The point is that I used the code I inserted in the first post of this discussion to determine the "Location Name" and it worked without a problem on the watch.

    For some time now, the name of the place where I live has not been displayed correctly and I don't know what it could be?

    Is it a development bug or something else???


    PSX: So can I ask you for help to look at my code or fix it for me somehow?

  • Code looks good. The problem is system/sdk/ciq returns name that for you is not good.

  • And can you somehow fix it?

    If it works for you, it's strange that it doesn't for me.

    what code are you using, can you email me?

  • It's not your code.  There is really nothing you can do in your code, as you are just displaying what you get back.  You may want to log observationLocationPosition, and see where that is (use toDegrees() to get lat/lon).  My guess is it will match what you see for name and the bad name is due to bad location data on your phone.

  • First check gps:

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

    and see on google maps if gps is ok