-
Notifications
You must be signed in to change notification settings - Fork 2
Geocoding Service
Geocoding is the process of converting addresses (like “1600 Amphitheatre Parkway, Mountain View, CA”) into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which you can use to place markers on a map or position the map.
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
client := route4me.NewClient("your-api-key")
service := &geocoding.Service{Client: client}
}
Forward geocoding is the process of converting place name information into latitude and longitude values.
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
client := route4me.NewClient("your-api-key")
service := &geocoding.Service{Client: client}
geo, err := service.ForwardAddress("Los20%Angeles20%International20%Airport,20%CA")
if err != nil {
//handle error
}
//do something with geo
}
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
client := route4me.NewClient("your-api-key")
service := &geocoding.Service{Client: client}
resp, err := service.ForwardBulk([]Row{Row{Address:"someaddress"}})
if err != nil {
//handle error
}
//do something with the response
}
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
client := route4me.NewClient("your-api-key")
service := &geocoding.Service{Client: client}
geo, err := service.ReverseAddress(33.945705, -118.391105)
if err != nil {
//handle error
}
//do something with geo
}
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
service := geocoding.NewRapidService("your-api-key")
}
Single address geocoding refers to the process of getting a geographic address by address name.
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
rapidService := geocoding.NewRapidService("your-api-key")
addr, err := rapidService.GetSingleAddress(1)
if err != nil {
//handle error
}
//do something with an address
}
This example refers to the process of getting all addresses.
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
rapidService := geocoding.NewRapidService("your-api-key")
addrs, err := rapidService.GetAddresses()
if err != nil {
//handle error
}
//do something with an array of addresses
}
This example refers to the process of getting a limited number of the addresses. The limitation parameters are: offset and limit.
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
rapidService := geocoding.NewRapidService("your-api-key")
// limit, offset
addrs, err := rapidService.GetLimitedAddresses(10, 5)
if err != nil {
//handle error
}
//do something with an array of addresses
}
This example refers to the process of getting all addresses containing a specified zip code.
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
rapidService := geocoding.NewRapidService("your-api-key")
addrs, err := rapidService.GetAddressesByZipcode("00601")
if err != nil {
//handle error
}
//do something with an array of addresses
}
This example refers to the process of getting all addresses containing a specified zip code.
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
rapidService := geocoding.NewRapidService("your-api-key")
// zipcode, limit, offset
addrs, err := rapidService.GetLimitedAddressesByZipcode("00601", 20, 0)
if err != nil {
//handle error
}
//do something with an array of addresses
}
This example refers to the process of getting all addresses containing a specified zip code and house number.
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
rapidService := geocoding.NewRapidService("your-api-key")
addrs, err := rapidService.GetAddressesByZipcodeAndHousenumber("00601", 17)
if err != nil {
//handle error
}
//do something with an array of addresses
}
This example refers to the process of getting a limited number of addresses containing a specified zip code and house number.
import (
"github.com/route4me/route4me-go-sdk"
"github.com/route4me/route4me-go-sdk/geocoding"
)
func main() {
rapidService := geocoding.NewRapidService("your-api-key")
// zipcode, housenumber, limit, offset
addrs, err := rapidService.GetLimitedAddressesByZipcodeAndHousenumber("00601", 17, 0, 20);
if err != nil {
//handle error
}
//do something with an array of addresses
}
- Activity
- Addressbook
- Routing
- Single Driver Route 10 Stops
- Single Driver Round Trip
- Single Depot Multiple Driver No Time Windows
- Single Depot Multiple Driver Time Windows
- Multiple Depot Multiple Driver
- Multiple Depot Multiple Driver With Time Windows
- Multiple Depot Multiple Driver With Time Windows (24 Stops)
- Tracking
- Geocoding
- Users
- Territories
- Orders
- Vehicles
- Telematics