Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting google link #1228

Open
kelvintaku opened this issue Jul 11, 2019 · 1 comment
Open

getting google link #1228

kelvintaku opened this issue Jul 11, 2019 · 1 comment

Comments

@kelvintaku
Copy link

Hello guys, Actually im using this client mod and im trying to add a feature that when i open the ContextMenu for a device, it displays an option that links to the device's google maps for its last position. Ive managed to add the MenuItem on the context menu but haven't figured out how to get device's google map link and put it on the onSelection command. If anyone can help me, i would really appreciate it

@vitalidze
Copy link
Owner

The device itself does not have the latest positions. But it can be obtained through the map controller, see for example the following method in the DeviceController:

    public void onMouseOver(int mouseX, int mouseY, Device device) {
        Position latestPosition = mapController.getLatestPosition(device);
        if (latestPosition != null) {
            positionInfo.show(mouseX, mouseY, latestPosition);
        }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants