anchor.diff:              }
             }
           } else {
  -          var graphic = createGraphic(trainId, payload);
  -          if (graphic != null) {
  -            trainToGraphicMap[trainId] = graphic;
  -            map.graphics.add(graphic);
  +          // The following test is in case we get a model train message instead of an augmented message
  +          if (payload.hasOwnProperty('location')) {
  +            var graphic = createGraphic(trainId, payload);
  +            if (graphic != null) {
  +              trainToGraphicMap[trainId] = graphic;
  +              map.graphics.add(graphic);
  +            }
  +          } else {
  +            console.log("Have not got a location");
             }
           }
         }
  
positive.code:       }
  
        function onMessageArrived(message) {
          var topicParts = message.destinationName.split("/");
          var trainId = topicParts[2];
          var payload = JSON.parse(message.payloadString);
  
negative.code: 
        function graphicClicked(evt) {
          console.log("Entering graphciClicked()");
          console.log("evt is " + JSON.stringify(evt));
          popup.setFeatures([evt.graphic]);
          popup.setTitle("Train " + evt.graphic.attributes.trainId);
          var popupContent = buildPopupContent(evt.graphic.attributes.trainId,
  