Documentation ¶
Index ¶
- type Country
- type CountryName
- type DeliveryPackage
- type EntryPoint
- type GuidedTour
- type ParsedAddress
- type ParsedPlace
- type ParsedStreetAddress
- type ParsedStreetName
- type Route
- type RouteWayPoint
- type TourDescription
- type TourDuration
- type TourIntroduction
- type TourLength
- type TourName
- type TourPicture
- type WayPointAddress
- type WayPointGeoPosition
- type WayPointLocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Country ¶
type Country struct { XMLName xml.Name `xml:"Country"` CountryCode int `xml:"CountryCode"` Name CountryName `xml:"Name"` }
Country contains details about some countries
type CountryName ¶
type CountryName struct { XMLName xml.Name `xml:"Name"` LanguageCode string `xml:"Language_Code,attr"` Value string `xml:",chardata"` }
CountryName contains a name and a language code of a country
type DeliveryPackage ¶
type DeliveryPackage struct { XMLName xml.Name `xml:"DeliveryPackage"` VersionNo string `xml:"VersionNo,attr"` CreationTime string `xml:"CreationTime,attr"` MapVersion string `xml:"MapVersion,attr"` LanguageCodeDesc string `xml:"Language_Code_Desc,attr"` CountryCodeDesc string `xml:"Country_Code_Desc,attr"` SupplierCodeDesc string `xml:"Supplier_Code_Desc,attr"` XYType string `xml:"XY_Type,attr"` CategoryCodeDesc string `xml:"Category_Code_Desc,attr"` CharSet string `xml:"Char_Set,attr"` UpdateType string `xml:"UpdateType,attr"` Coverage string `xml:"Coverage,attr"` Category string `xml:"Category,attr"` MajorVersion string `xml:"MajorVersion,attr"` MinorVersion string `xml:"MinorVersion,attr"` GuidedTour []GuidedTour `xml:"GuidedTour"` }
DeliveryPackage is the root node of the BMW route format
func NavFromGPX ¶
func NavFromGPX(gpx gpx.GPX, routeID int64) (DeliveryPackage, error)
NavFromGPX maps GPX data into the BMW format for "Nav" folder
func NavigationFromGPX ¶
func NavigationFromGPX(gpx gpx.GPX, routeID int64) (DeliveryPackage, error)
NavigationFromGPX maps GPX data into the BMW format for "Nav" folder
func (DeliveryPackage) ToXML ¶
func (bmw DeliveryPackage) ToXML() ([]byte, error)
ToXML converts the BMW structure to some real xml Text
type EntryPoint ¶
type EntryPoint struct { XMLName xml.Name `xml:"EntryPoint"` Route string `xml:"Route,attr"` Value string `xml:",chardata"` }
EntryPoint contains information about where the tour can be started
type GuidedTour ¶
type GuidedTour struct { XMLName xml.Name `xml:"GuidedTour"` Access string `xml:"access,attr"` Use string `xml:"use,attr"` ID string `xml:"Id"` TripType string `xml:"TripType"` Countries []Country `xml:"Countries>Country"` Names []TourName `xml:"Names>Name"` Length TourLength `xml:"Length"` Duration TourDuration `xml:"Duration"` Introductions []TourIntroduction `xml:"Introductions>Introduction"` Descriptions []TourDescription `xml:"Descriptions>Description"` Pictures []TourPicture `xml:"Pictures>Picture"` EntryPoints []EntryPoint `xml:"EntryPoints>EntryPoint"` Routes []Route `xml:"Routes>Route"` }
GuidedTour contains all data for the route
type ParsedAddress ¶
type ParsedAddress struct { XMLName xml.Name `xml:"ParsedAddress"` ParsedStreetAddress ParsedStreetAddress `xml:"ParsedStreetAddress"` ParsedPlace ParsedPlace `xml:"ParsedPlace"` }
ParsedAddress contains parsed address data
type ParsedPlace ¶
type ParsedPlace struct { XMLName xml.Name `xml:"ParsedPlace"` PlaceLevel4 string `xml:"PlaceLevel4"` }
ParsedPlace contains a parsed place information
type ParsedStreetAddress ¶
type ParsedStreetAddress struct { XMLName xml.Name `xml:"ParsedStreetAddress"` ParsedStreetName ParsedStreetName `xml:"ParsedStreetName"` }
ParsedStreetAddress contains parsed street address data
type ParsedStreetName ¶
type ParsedStreetName struct { XMLName xml.Name `xml:"ParsedStreetName"` StreetName string `xml:"StreetName"` }
ParsedStreetName contains a parsed street name
type Route ¶
type Route struct { XMLName xml.Name `xml:"Route"` RouteID string `xml:"RouteID"` WayPoint []RouteWayPoint `xml:"WayPoint"` Length TourLength `xml:"Length"` Duration TourDuration `xml:"Duration"` CostModel int `xml:"CostModel"` Criteria int `xml:"Criteria"` AgoraCString string `xml:"AgoraCString"` }
Route contains information about the route
type RouteWayPoint ¶
type RouteWayPoint struct { XMLName xml.Name `xml:"WayPoint"` ID string `xml:"Id"` Locations []WayPointLocation `xml:"Locations>Location"` Importance string `xml:"Importance"` Descriptions []TourDescription `xml:"Descriptions>Description"` }
RouteWayPoint is a way point of a route
type TourDescription ¶
type TourDescription struct { XMLName xml.Name `xml:"Description"` LanguageCode string `xml:"Language_Code,attr"` Text string `xml:"Text"` }
TourDescription contains descriptions (text & language code) for a tour
type TourDuration ¶
type TourDuration struct { XMLName xml.Name `xml:"Duration"` Unit string `xml:"Unit,attr"` Value float64 `xml:",chardata"` }
TourDuration contains the driving duration and a unit of this tour
type TourIntroduction ¶
type TourIntroduction struct { XMLName xml.Name `xml:"Introduction"` LanguageCode string `xml:"Language_Code,attr"` Text string `xml:"Text"` }
TourIntroduction contains information about introductions?
type TourLength ¶
type TourLength struct { XMLName xml.Name `xml:"Length"` Unit string `xml:"Unit,attr"` Value float64 `xml:",chardata"` }
TourLength contains the length and a unit of this tour
type TourName ¶
type TourName struct { XMLName xml.Name `xml:"Name"` LanguageCode string `xml:"Language_Code,attr"` Text string `xml:"Text"` }
TourName contains a name and a language code of the tour
type TourPicture ¶
type TourPicture struct { XMLName xml.Name `xml:"Picture"` Reference string `xml:"Reference"` Encoding string `xml:"Encoding"` Width int `xml:"Width"` Height int `xml:"Height"` }
TourPicture contains
type WayPointAddress ¶
type WayPointAddress struct { XMLName xml.Name `xml:"Address"` ParsedAddress ParsedAddress `xml:"ParsedAddress"` }
WayPointAddress contains the address details for a waypoint
type WayPointGeoPosition ¶
type WayPointGeoPosition struct { XMLName xml.Name `xml:"GeoPosition"` Latitude float64 `xml:"Latitude"` Longitude float64 `xml:"Longitude"` }
WayPointGeoPosition contains information about the geographical position
type WayPointLocation ¶
type WayPointLocation struct { XMLName xml.Name `xml:"Location"` Address *WayPointAddress `xml:"Address,omitempty"` GeoPosition WayPointGeoPosition `xml:"GeoPosition"` }
WayPointLocation contains information about where the waypoint is