gps

package
v0.0.0-...-bcd5dfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2024 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Map []MapPoint

Functions

func InitMap

func InitMap()

Types

type LocationInfo

type LocationInfo struct {
	Country string `json:"country"`
	City    string `json:"city"`
}

func GetLocationAtCoordinates

func GetLocationAtCoordinates(x, y float64) LocationInfo

type MapAPI

type MapAPI struct {
}

func NewMapAPI

func NewMapAPI() MapAPI

func (MapAPI) GetOnlinePlayerData

func (mapApi MapAPI) GetOnlinePlayerData(nameOrId string) ([]PlayerData, error)

type MapPoint

type MapPoint struct {
	PointType string     `json:"type"`
	Name      string     `json:"name"`
	X         float64    `json:"x"`
	Y         float64    `json:"y"`
	Children  []MapPoint `json:"pois"`
}

type PlayerData

type PlayerData struct {
	Name       string  `json:"Name"`
	X          float64 `json:"X"`
	Y          float64 `json:"Y"`
	Heading    float64 `json:"Heading"`
	MpId       int64   `json:"MpId"`
	PlayerId   int64   `json:"PlayerId"`
	ServerId   int64   `json:"ServerId"`
	ServerType int64   `json:"ServerType"`
	Time       int64   `json:"Time"`
}

type TruckersMPResponse

type TruckersMPResponse struct {
	Data    any  `json:"Data"`
	Success bool `json:"Success"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL