コード例 #1
0
func parsePlaceType(placeType string, r *maps.PlaceAutocompleteRequest) {
	if placeType != "" {
		t, err := maps.ParsePlaceType(placeType)
		check(err)
		r.Type = t
	}
}
コード例 #2
0
func parseLocation(location string, r *maps.PlaceAutocompleteRequest) {
	if location != "" {
		l, err := maps.ParseLatLng(location)
		check(err)
		r.Location = &l
	}
}