mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
* Fix for #813 Ensure `msg.location` exists before populating * Only add location data if location present
This commit is contained in:
parent
cdcafbad1d
commit
ebd043cec6
@ -62,6 +62,7 @@ module.exports = function(RED) {
|
||||
else {
|
||||
node.log("The location of this image cannot be determined safely so no location information has been added to the message.");
|
||||
}
|
||||
if (msg.location) {
|
||||
msg.location.arc = {
|
||||
ranges: [500,1000,2000],
|
||||
pan: gpsData.GPSImgDirection,
|
||||
@ -77,6 +78,7 @@ module.exports = function(RED) {
|
||||
msg.location.layer = "Images";
|
||||
msg.location.popup = '<img width="280" src="data:image/jpeg;base64,'+val.toString("base64")+'"/>'
|
||||
}
|
||||
}
|
||||
|
||||
this.on("input", function(msg) {
|
||||
if (node.mode === "worldmap" && Buffer.isBuffer(msg.payload)) { node.property = "payload"; }
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-node-exif",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"description": "A Node-RED node that extracts Exif information from JPEG image buffers.",
|
||||
"dependencies": {
|
||||
"exif": "^0.6.0"
|
||||
|
Loading…
Reference in New Issue
Block a user