Versions in this module Expand all Collapse all v0 v0.0.1 Feb 24, 2026 Changes in this version + func CircleBias(lon, lat, radiusMeters float64) string + func CircleFilter(lon, lat, radiusMeters float64) string + func CountryBias(codes ...string) string + func CountryFilter(codes ...string) string + func PlaceFilter(placeID string) string + func ProximityBias(lon, lat float64) string + func RectBias(lon1, lat1, lon2, lat2 float64) string + func RectFilter(lon1, lat1, lon2, lat2 float64) string + type APIError struct + Message string + RawBody []byte + StatusCode int + func IsAPIError(err error) (*APIError, bool) + func (e *APIError) Error() string + type Address struct + AddressLine1 string + AddressLine2 string + Category string + City string + Country string + CountryCode string + County string + CountyCode string + Datasource *Datasource + Distance float64 + District string + Formatted string + HouseNumber string + Lat float64 + Lon float64 + Name string + PlaceID string + Postcode string + Rank *Rank + ResultType string + State string + StateCode string + Street string + Suburb string + Timezone *Timezone + type AutocompleteRequest struct + func (r *AutocompleteRequest) Do(ctx context.Context) (*GeocodingResponse, error) + func (r *AutocompleteRequest) WithBias(biases ...string) *AutocompleteRequest + func (r *AutocompleteRequest) WithFilter(filters ...string) *AutocompleteRequest + func (r *AutocompleteRequest) WithFormat(f Format) *AutocompleteRequest + func (r *AutocompleteRequest) WithLang(v string) *AutocompleteRequest + func (r *AutocompleteRequest) WithType(t LocationType) *AutocompleteRequest + type BatchForwardRequest struct + func (r *BatchForwardRequest) Do(ctx context.Context) (*BatchJobResponse, error) + func (r *BatchForwardRequest) WithBias(biases ...string) *BatchForwardRequest + func (r *BatchForwardRequest) WithFilter(filters ...string) *BatchForwardRequest + func (r *BatchForwardRequest) WithLang(v string) *BatchForwardRequest + func (r *BatchForwardRequest) WithType(t LocationType) *BatchForwardRequest + type BatchGeocodingService struct + func (s *BatchGeocodingService) GetForwardResult(jobID string) *BatchResultRequest + func (s *BatchGeocodingService) GetReverseResult(jobID string) *BatchResultRequest + func (s *BatchGeocodingService) SubmitForward(addresses []string) *BatchForwardRequest + func (s *BatchGeocodingService) SubmitReverse(coordinates [][2]float64) *BatchReverseRequest + type BatchJobResponse struct + ID string + Status string + URL string + type BatchResultRequest struct + func (r *BatchResultRequest) Do(ctx context.Context) (*BatchResultResponse, error) + func (r *BatchResultRequest) WithFormat(v string) *BatchResultRequest + type BatchResultResponse struct + ID string + Raw json.RawMessage + Results []Address + Status string + func (r *BatchResultResponse) UnmarshalJSON(data []byte) error + type BatchReverseRequest struct + func (r *BatchReverseRequest) Do(ctx context.Context) (*BatchJobResponse, error) + func (r *BatchReverseRequest) WithLang(v string) *BatchReverseRequest + func (r *BatchReverseRequest) WithType(t LocationType) *BatchReverseRequest + type BoundariesConsistsOfRequest struct + func (r *BoundariesConsistsOfRequest) Do(ctx context.Context) (*GeoJSONFeatureCollection, error) + func (r *BoundariesConsistsOfRequest) WithBoundary(b BoundaryType) *BoundariesConsistsOfRequest + func (r *BoundariesConsistsOfRequest) WithGeometry(g GeometryType) *BoundariesConsistsOfRequest + func (r *BoundariesConsistsOfRequest) WithLang(v string) *BoundariesConsistsOfRequest + func (r *BoundariesConsistsOfRequest) WithSublevel(n int) *BoundariesConsistsOfRequest + type BoundariesPartOfRequest struct + func (r *BoundariesPartOfRequest) Do(ctx context.Context) (*GeoJSONFeatureCollection, error) + func (r *BoundariesPartOfRequest) WithBoundary(b BoundaryType) *BoundariesPartOfRequest + func (r *BoundariesPartOfRequest) WithGeometry(g GeometryType) *BoundariesPartOfRequest + func (r *BoundariesPartOfRequest) WithLang(v string) *BoundariesPartOfRequest + type BoundariesService struct + func (s *BoundariesService) ConsistsOf(id string) *BoundariesConsistsOfRequest + func (s *BoundariesService) PartOf(lat, lon float64) *BoundariesPartOfRequest + func (s *BoundariesService) PartOfByID(id string) *BoundariesPartOfRequest + type BoundaryType string + const BoundaryAdministrative + const BoundaryLowEmissionZone + const BoundaryPolitical + const BoundaryPostalCode + type Client struct + func NewClient(apiKey string, opts ...Option) *Client + func (c *Client) BatchGeocoding() *BatchGeocodingService + func (c *Client) Boundaries() *BoundariesService + func (c *Client) Geocoding() *GeocodingService + func (c *Client) IPGeolocation() *IPGeolocationService + func (c *Client) Isolines() *IsolinesService + func (c *Client) MapMatching() *MapMatchingService + func (c *Client) PlaceDetails() *PlaceDetailsService + func (c *Client) Places() *PlacesService + func (c *Client) Postcode() *PostcodeService + func (c *Client) RouteMatrix() *RouteMatrixService + func (c *Client) RoutePlanner() *RoutePlannerService + func (c *Client) Routing() *RoutingService + type Datasource struct + Attribution string + License string + SourceName string + URL string + type Format string + const FormatGeoJSON + const FormatJSON + const FormatXML + type GeoJSONFeature struct + Geometry *GeoJSONGeometry + Properties map[string]any + Type string + type GeoJSONFeatureCollection struct + Features []GeoJSONFeature + Properties map[string]any + Type string + type GeoJSONGeometry struct + Coordinates any + Type string + type GeocodingParsed struct + City string + Country string + ExpectedType string + HouseNumber string + Postcode string + State string + Street string + type GeocodingQuery struct + Parsed *GeocodingParsed + Text string + type GeocodingResponse struct + Query *GeocodingQuery + Results []Address + type GeocodingService struct + func (s *GeocodingService) Autocomplete(text string) *AutocompleteRequest + func (s *GeocodingService) Reverse(lat, lon float64) *ReverseGeocodingRequest + func (s *GeocodingService) Search(text string) *SearchRequest + type GeometryType string + const Geometry1000 + const Geometry10000 + const Geometry5000 + const GeometryPoint + type IPGeolocationRequest struct + func (r *IPGeolocationRequest) Do(ctx context.Context) (*IPGeolocationResponse, error) + func (r *IPGeolocationRequest) WithIP(ip string) *IPGeolocationRequest + type IPGeolocationResponse struct + City *IPLocationCity + Continent *IPLocationContinent + Country *IPLocationCountry + IP string + Location *IPLocationCoords + State *IPLocationState + type IPGeolocationService struct + func (s *IPGeolocationService) Lookup() *IPGeolocationRequest + type IPLocationCity struct + Name string + type IPLocationContinent struct + Code string + Name string + type IPLocationCoords struct + Latitude float64 + Longitude float64 + type IPLocationCountry struct + Capital string + Currency string + Flag string + ISOCode string + Languages []IPLocationLang + Name string + NameNative string + PhoneCode string + type IPLocationLang struct + ISOCode string + Name string + NameNative string + type IPLocationState struct + Name string + type IsolineRequest struct + func (r *IsolineRequest) Do(ctx context.Context) (*GeoJSONFeatureCollection, error) + func (r *IsolineRequest) WithAvoid(avoids ...string) *IsolineRequest + func (r *IsolineRequest) WithMaxSpeed(n int) *IsolineRequest + func (r *IsolineRequest) WithMode(m TravelMode) *IsolineRequest + func (r *IsolineRequest) WithRange(ranges ...int) *IsolineRequest + func (r *IsolineRequest) WithRouteType(rt RouteType) *IsolineRequest + func (r *IsolineRequest) WithTraffic(t TrafficModel) *IsolineRequest + func (r *IsolineRequest) WithType(t IsolineType) *IsolineRequest + func (r *IsolineRequest) WithUnits(u Units) *IsolineRequest + type IsolineType string + const IsolineDistance + const IsolineTime + type IsolinesService struct + func (s *IsolinesService) At(lat, lon float64) *IsolineRequest + func (s *IsolinesService) ByID(id string) *IsolineRequest + type LegStep struct + Bridge bool + Distance float64 + Ferry bool + FromIndex int + Instruction *StepInstruction + LaneCount int + Name string + RoadClass string + Roundabout bool + Speed float64 + SpeedLimit float64 + Surface string + Time float64 + ToIndex int + Toll bool + TruckLimit float64 + Tunnel bool + type Location struct + Lat float64 + Lon float64 + func LatLon(lat, lon float64) Location + func LonLat(lon, lat float64) Location + type LocationType string + const TypeAmenity + const TypeCity + const TypeCountry + const TypeLocality + const TypePostcode + const TypeState + const TypeStreet + type MapMatchingRequest struct + func (r *MapMatchingRequest) Do(ctx context.Context) (*GeoJSONFeatureCollection, error) + func (r *MapMatchingRequest) Waypoints(waypoints ...MapMatchingWaypoint) *MapMatchingRequest + func (r *MapMatchingRequest) WithMode(mode TravelMode) *MapMatchingRequest + type MapMatchingService struct + func (s *MapMatchingService) Match() *MapMatchingRequest + type MapMatchingWaypoint struct + Bearing *float64 + Location [2]float64 + Timestamp string + type Option func(*Client) + func WithBaseURL(url string) Option + func WithHTTPClient(c *http.Client) Option + func WithRetry(maxRetries int, initialDelay, maxDelay time.Duration) Option + type PlaceDetailsRequest struct + func (r *PlaceDetailsRequest) Do(ctx context.Context) (*GeoJSONFeatureCollection, error) + func (r *PlaceDetailsRequest) WithFeatures(features ...string) *PlaceDetailsRequest + func (r *PlaceDetailsRequest) WithLang(v string) *PlaceDetailsRequest + type PlaceDetailsService struct + func (s *PlaceDetailsService) ByCoordinates(lat, lon float64) *PlaceDetailsRequest + func (s *PlaceDetailsService) ByID(placeID string) *PlaceDetailsRequest + type PlacesRequest struct + func (r *PlacesRequest) Do(ctx context.Context) (*GeoJSONFeatureCollection, error) + func (r *PlacesRequest) WithBias(biases ...string) *PlacesRequest + func (r *PlacesRequest) WithConditions(conditions ...string) *PlacesRequest + func (r *PlacesRequest) WithFilter(filters ...string) *PlacesRequest + func (r *PlacesRequest) WithLang(v string) *PlacesRequest + func (r *PlacesRequest) WithLimit(n int) *PlacesRequest + func (r *PlacesRequest) WithName(v string) *PlacesRequest + func (r *PlacesRequest) WithOffset(n int) *PlacesRequest + type PlacesService struct + func (s *PlacesService) Categories(categories ...string) *PlacesRequest + type PlannerAgent struct + Breaks []PlannerBreak + Capabilities []string + DeliveryCapacity *int + Description string + EndLocation [2]float64 + EndLocationIdx *int + ID string + PickupCapacity *int + StartLocation [2]float64 + StartLocationIdx *int + TimeWindows [][2]int + type PlannerAgentResult struct + AgentIndex int + Distance float64 + Route []PlannerRouteStep + Time float64 + type PlannerBreak struct + Duration int + TimeWindows [][2]int + type PlannerJob struct + DeliveryAmount *int + Description string + Duration *int + ID string + Location [2]float64 + LocationIdx *int + PickupAmount *int + Priority *int + Requirements []string + TimeWindows [][2]int + type PlannerLocation struct + ID string + Location [2]float64 + type PlannerRouteStep struct + Distance float64 + JobIndex *int + Time float64 + Type string + type PlannerShipment struct + Amount *int + Delivery PlannerShipmentStop + Description string + ID string + Pickup PlannerShipmentStop + Priority *int + Requirements []string + type PlannerShipmentStop struct + Duration *int + Location [2]float64 + LocationIdx *int + TimeWindows [][2]int + type PostcodeRequest struct + func (r *PostcodeRequest) Do(ctx context.Context) (*GeoJSONFeatureCollection, error) + func (r *PostcodeRequest) WithBias(biases ...string) *PostcodeRequest + func (r *PostcodeRequest) WithFilter(filters ...string) *PostcodeRequest + func (r *PostcodeRequest) WithFormat(f Format) *PostcodeRequest + func (r *PostcodeRequest) WithGeometry(g GeometryType) *PostcodeRequest + func (r *PostcodeRequest) WithLang(v string) *PostcodeRequest + func (r *PostcodeRequest) WithLimit(n int) *PostcodeRequest + type PostcodeService struct + func (s *PostcodeService) Search(lat, lon float64) *PostcodeRequest + type Rank struct + Confidence float64 + ConfidenceBuildingLevel float64 + ConfidenceCityLevel float64 + ConfidenceStreetLevel float64 + Importance float64 + MatchType string + Popularity float64 + type ReverseGeocodingRequest struct + func (r *ReverseGeocodingRequest) Do(ctx context.Context) (*GeocodingResponse, error) + func (r *ReverseGeocodingRequest) WithFormat(f Format) *ReverseGeocodingRequest + func (r *ReverseGeocodingRequest) WithLang(v string) *ReverseGeocodingRequest + func (r *ReverseGeocodingRequest) WithLimit(n int) *ReverseGeocodingRequest + func (r *ReverseGeocodingRequest) WithType(t LocationType) *ReverseGeocodingRequest + type Route struct + Distance float64 + DistanceUnits string + Ferry bool + Legs []RouteLeg + Time float64 + Toll bool + type RouteDetail string + const DetailElevation + const DetailInstructions + const DetailRoute + type RouteLeg struct + CountryCode []string + Distance float64 + Elevation []float64 + ElevationRange [][]float64 + Steps []LegStep + Time float64 + type RouteMatrixAvoid struct + Type string + Values []Location + type RouteMatrixEntry struct + Distance float64 + SourceIndex int + TargetIndex int + Time float64 + type RouteMatrixRequest struct + func (r *RouteMatrixRequest) Do(ctx context.Context) (*RouteMatrixResponse, error) + func (r *RouteMatrixRequest) Sources(locations ...Location) *RouteMatrixRequest + func (r *RouteMatrixRequest) Targets(locations ...Location) *RouteMatrixRequest + func (r *RouteMatrixRequest) WithAvoid(avoids ...RouteMatrixAvoid) *RouteMatrixRequest + func (r *RouteMatrixRequest) WithMaxSpeed(n int) *RouteMatrixRequest + func (r *RouteMatrixRequest) WithMode(mode TravelMode) *RouteMatrixRequest + func (r *RouteMatrixRequest) WithTraffic(t TrafficModel) *RouteMatrixRequest + func (r *RouteMatrixRequest) WithType(t RouteType) *RouteMatrixRequest + func (r *RouteMatrixRequest) WithUnits(u Units) *RouteMatrixRequest + type RouteMatrixResponse struct + Sources []RouteMatrixWaypoint + SourcesToTargets [][]RouteMatrixEntry + Targets []RouteMatrixWaypoint + type RouteMatrixService struct + func (s *RouteMatrixService) Calculate() *RouteMatrixRequest + type RouteMatrixWaypoint struct + Location [2]float64 + OriginalLocation [2]float64 + type RoutePlannerRequest struct + func (r *RoutePlannerRequest) Do(ctx context.Context) (*RoutePlannerResponse, error) + func (r *RoutePlannerRequest) WithAgents(agents ...PlannerAgent) *RoutePlannerRequest + func (r *RoutePlannerRequest) WithAvoid(avoids ...RouteMatrixAvoid) *RoutePlannerRequest + func (r *RoutePlannerRequest) WithJobs(jobs ...PlannerJob) *RoutePlannerRequest + func (r *RoutePlannerRequest) WithLocations(locations ...PlannerLocation) *RoutePlannerRequest + func (r *RoutePlannerRequest) WithMaxSpeed(n int) *RoutePlannerRequest + func (r *RoutePlannerRequest) WithMode(mode TravelMode) *RoutePlannerRequest + func (r *RoutePlannerRequest) WithShipments(shipments ...PlannerShipment) *RoutePlannerRequest + func (r *RoutePlannerRequest) WithTraffic(t TrafficModel) *RoutePlannerRequest + func (r *RoutePlannerRequest) WithType(t RouteType) *RoutePlannerRequest + func (r *RoutePlannerRequest) WithUnits(u Units) *RoutePlannerRequest + type RoutePlannerResponse struct + Agents []PlannerAgentResult + Properties map[string]any + type RoutePlannerService struct + func (s *RoutePlannerService) Plan() *RoutePlannerRequest + type RouteType string + const RouteBalanced + const RouteLessManeuvers + const RouteShort + type RoutingRequest struct + func (r *RoutingRequest) Do(ctx context.Context) (*RoutingResponse, error) + func (r *RoutingRequest) WithAvoid(avoids ...string) *RoutingRequest + func (r *RoutingRequest) WithDetails(details ...RouteDetail) *RoutingRequest + func (r *RoutingRequest) WithFormat(f Format) *RoutingRequest + func (r *RoutingRequest) WithLang(v string) *RoutingRequest + func (r *RoutingRequest) WithMaxSpeed(n int) *RoutingRequest + func (r *RoutingRequest) WithMode(mode TravelMode) *RoutingRequest + func (r *RoutingRequest) WithTraffic(t TrafficModel) *RoutingRequest + func (r *RoutingRequest) WithType(t RouteType) *RoutingRequest + func (r *RoutingRequest) WithUnits(u Units) *RoutingRequest + type RoutingResponse struct + Properties map[string]any + Results []Route + type RoutingService struct + func (s *RoutingService) Waypoints(waypoints ...Location) *RoutingRequest + type SearchRequest struct + func (r *SearchRequest) Do(ctx context.Context) (*GeocodingResponse, error) + func (r *SearchRequest) WithBias(biases ...string) *SearchRequest + func (r *SearchRequest) WithCity(v string) *SearchRequest + func (r *SearchRequest) WithCountry(v string) *SearchRequest + func (r *SearchRequest) WithFilter(filters ...string) *SearchRequest + func (r *SearchRequest) WithFormat(f Format) *SearchRequest + func (r *SearchRequest) WithHouseNumber(v string) *SearchRequest + func (r *SearchRequest) WithLang(v string) *SearchRequest + func (r *SearchRequest) WithLimit(n int) *SearchRequest + func (r *SearchRequest) WithName(v string) *SearchRequest + func (r *SearchRequest) WithPostcode(v string) *SearchRequest + func (r *SearchRequest) WithState(v string) *SearchRequest + func (r *SearchRequest) WithStreet(v string) *SearchRequest + func (r *SearchRequest) WithType(t LocationType) *SearchRequest + type StepInstruction struct + Text string + Type string + type Timezone struct + AbbreviationDST string + AbbreviationSTD string + Name string + NameAlt string + OffsetDST string + OffsetDSTSeconds int + OffsetSTD string + OffsetSTDSeconds int + type TrafficModel string + const TrafficApproximated + const TrafficFreeFlow + type TravelMode string + const ModeApproximatedTransit + const ModeBicycle + const ModeBus + const ModeDrive + const ModeHeavyTruck + const ModeHike + const ModeLightTruck + const ModeLongTruck + const ModeMediumTruck + const ModeMotorcycle + const ModeMountainBike + const ModeRoadBike + const ModeScooter + const ModeTransit + const ModeTruck + const ModeTruckDangerousGoods + const ModeWalk + type Units string + const UnitsImperial + const UnitsMetric