Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10228 closed enhancement (fixed)

"Position is unknown" message

Reported by: naoliv Owned by: Zverikk
Priority: normal Milestone:
Component: Plugin geochat Version:
Keywords: Cc:

Description

Sometimes I am seeing a "Position is unknown" while loading some data into JOSM.
I don't know how to reproduce this, since loading the same data again it doesn't display the message.
Could this message be more informative, please?

Attachments (0)

Change History (5)

comment:1 by Don-vip, 11 years ago

Component: CorePlugin geochat
Owner: changed from team to Zverikk

comment:2 by Don-vip, 11 years ago

from GeoChat plugin:

    /**
     * Returns current coordinates or null if there is no map, or zoom is too low.
     */
    private static LatLon getPosition() {
        if( Main.map == null || Main.map.mapView == null )
            return null;
        if( getCurrentZoom() < 10 )
            return null;
        Projection proj = Main.getProjection();
        return proj.eastNorth2latlon(Main.map.mapView.getCenter());
    }

    public void login( final String userName ) {
        // snip
        LatLon pos = getPosition();
        if( pos == null ) {
            fireLoginFailed("Position is unknown");
            return;
        }
        // snip
    }

    public void postMessage( String message, String targetUser ) {
        // snip
        LatLon pos = getPosition();
        if( pos == null ) {
            fireMessageFailed("Position is unknown");
            return;
        }
        // snip
    }

comment:3 by Zverikk, 11 years ago

This message is displayed when zoom level is too low to tie a user to a specific place. But it should be made unobtrusive, I'm on it.

comment:4 by Zverikk, 11 years ago

Resolution: fixed
Status: newclosed

So yes, I've just updated the plugin to use new unobtrusive notification messages. The message in question appears when either the map window is not loaded yet, or zoom level is too low (less than 10).

comment:5 by Zverikk, 11 years ago

(and also I've just changed message text, fixing the reported issue)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Zverikk.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.