We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I cannot get a same result as RFC describes for the Geolocation field!
RFC GEO Example: GEO;TYPE=work:geo:46.772673,-71.282945
GEO;TYPE=work:geo:46.772673,-71.282945
My result: GEO;TYPE=work:geo:51.446570\,35.662524
GEO;TYPE=work:geo:51.446570\,35.662524
go-vcard escapes the value and there is no way to use the actual chars in value.
The code:
card.Set( vcard.FieldGeolocation, &vcard.Field{ Value: fmt.Sprintf("%f,%f", info.Location.X, info.Location.Y), Params: map[string][]string{ vcard.ParamType: {vcard.TypeWork + ":geo"}, }, Group: "", }, )
I was also getting GEO;TYPE=work;51.446570\,35.662524 which is why i used vcard.TypeWork + ":geo" as a value for ParamType
GEO;TYPE=work;51.446570\,35.662524
vcard.TypeWork + ":geo"
ParamType
The text was updated successfully, but these errors were encountered:
#35 should address this:
card.Set( vcard.FieldGeolocation, &vcard.Field{ Value: vcard.FieldValue(fmt.Sprintf("geo:%f,%f", info.Location.X, info.Location.Y)), // set raw value Params: map[string][]string{ vcard.ParamType: {vcard.TypeWork}, }, Group: "", }, )
(you could also split the two coordinates and call NewFieldValue(x,y), but this would be more hacky I think)
NewFieldValue(x,y)
Sorry, something went wrong.
No branches or pull requests
Hello,
I cannot get a same result as RFC describes for the Geolocation field!
RFC GEO Example:
GEO;TYPE=work:geo:46.772673,-71.282945
My result:
GEO;TYPE=work:geo:51.446570\,35.662524
go-vcard escapes the value and there is no way to use the actual chars in value.
The code:
I was also getting
GEO;TYPE=work;51.446570\,35.662524
which is why i usedvcard.TypeWork + ":geo"
as a value forParamType
The text was updated successfully, but these errors were encountered: