Exemplo n.º 1
0
// parsePlacesIds takes a placesIds argument string and decodes it.
func parsePlaceIDs(placeIDs string, r *maps.SpeedLimitsRequest) {
	if placeIDs != "" {
		ids := strings.Split(placeIDs, ",")
		for _, id := range ids {
			r.PlaceID = append(r.PlaceID, id)
		}
	}
}
Exemplo n.º 2
0
// parsePath takes a location argument string and decodes it.
func parsePath(path string, r *maps.SpeedLimitsRequest) {
	if path != "" {
		ls := strings.Split(path, "|")
		for _, l := range ls {
			ll, err := maps.ParseLatLng(l)
			check(err)
			r.Path = append(r.Path, ll)
		}
	}
}