- Mais recentes
- Mais votos
- Mais comentários
Hi. Here's a JS example: https://github.com/aws-samples/amazon-location-samples/blob/7b3b923fef570d952de60c60945985fb4d6001bb/amplify-ui-geo-explore/src/components/trackers/TrackersLayer.jsx#L33-L47
Hello there. At this time the IoT Core Rule for Amazon Location Service does not support passing Metadata to Amazon Location Service trackers. Currently, only the position data is passed through. If you need to pass these through, you will need to make use of a Lambda Rule: https://docs.aws.amazon.com/location/latest/developerguide/tracking-using-mqtt-with-lambda.html. Then, using the https://docs.aws.amazon.com/location/latest/APIReference/API_GetDevicePositionHistory.html API, you can access this position history along with your Position Properties.
I hope this helps and I've passed on your feedback to our IoT Core team
Conteúdo relevante
- AWS OFICIALAtualizada há 3 anos
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há um ano
- AWS OFICIALAtualizada há um ano
Hi and thanks very much for your quick response! Unfortunately, I don't think this answers my question. Your example shows how to SET these metadata using BatchUpdateDevicePositionCommand(), but in my application, the position updates are done by a rule in IOT core. I'm guessing I might be able to use a "lamda action" instead of the "location action" in my IOT core rule. However, this only associates the metadata with the tracker. I still don't see (and your example doesn't appear to show) how to actually access that metadata along with the position data; i.e., the list of positions retrieved by GetDevicePositionHistoryCommand() DO NOT contain any metadata, so how exactly does one access the metadata?