Closed torlarse closed 3 years ago
Closing due to misunderstanding on my behalf. I realize the Go Maps types are set up to receive values from the Google Maps Platform, that is with URL requests to the API. The platform responses are not the same as the Maps JS API responses.
Is your feature request related to a problem? Please describe. In this library, the
Step
typeuses
html_instructions
as the JSON property key. The Google Maps Javascript API usesinstructions
as the JSON key for the same property. Therefore, when sending agoogle.maps.DirectionsLeg
orgoogle.maps.DirectionsStep
from a JS client over HTTP, the HTML instructions are empty after decoding.Describe the solution you'd like An interface (?) handling both
json:"html_instructions"
andjson:"instructions"
as equivalent keys for decoding the HTML instructions property to the appropriate field in theStep
struct type.Describe alternatives you've considered Writing a custom struct for decoding a Leg sent via HTTP. Did not succeed.