Open GibMeMyPacket opened 1 year ago
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)
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