Open kelvintaku opened 5 years ago
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);
}
}
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