That should work (does for me), but 404 indicates that your locationid was not found in the database. Or you have a bug in your API code.
I've noticed this too. That's a leftover from the 1st edition:

var sendJsonResponse = function(res, status, content) {
  res.status(status);
  res.json(content);
};


IMHO it would be much more useful if Express came with

res.ok(content)
or
res.notFound()
etc. out-of-the-box.
The same happened to me—sometimes the maps would show correctly, but most times they wouldn't. Once I looked at my browser's developer console (aka F12 tools), I saw that maps.googleapis.com returned 403 Forbidden whenever the map was not displayed. Long story short: It seems that you now need an API key to use maps.googleapis.com (you can get one at https://console.developers.google.com/). After adding the API key to maps URL in location-info-pug (or rather passing it through the controller to the view), the map feature worked fine again.
I guess this is a somewhat recent change in express-generator. BTW, have a look at p179, section "Including the routes in the application". Here it also says index, not routes smilie.
After fiddling with your sample, I found that a stumbled across a string of errors I had made that more or less hid the validation error.

Another thing I realized is that the integration with Bootstrap's form related classes has to be done manually. That's something that might be worth mentioning in section 6.3.4. (see the attached screenshot and how invalid fields are highlighted, whereas there's no additional visual cue on the input elements in figure 6.9 and 6.10).
As I said, I've tested this already--it doesn't validate in ASP.NET Core MVC, nor does it in MVC 5. Or I'm doing something wrong smilie
Table 8.1 shows PhoneNumber as validation attribute, but the attribute is actually called [Phone] (i.e. System.ComponentModel.DataAnnotations.PhoneAttribute.

Aside: Is [Phone] really used for validation? I see neither client side nor server side validation being used for a binding model with a [Phone] property (assuming 'asgdsg' doesn't qualify as valid phone number smilie). The same is true for DataType(DataType.PhoneNumber).
Great book so far smilie. Aurelia really seems to be much easier to get started with than Angular.

I've found two minor errors in Chapter 2:

  • The project structure shown in Figure 2.18 shows two index components: One located directly in src, the other one in src/resources/elements. This duplicate index is also contained in the Chapter-2-Complete directory in the book's GitHub repo. According to the router configuration in app.js, the copy under src/resources/elements should be redundant.

    The books component and earlier versions of the same code in other components import bindable, yet never use it.
  • package.json shown in Listing 3.8 doesn't fit to Listing 3.1. It seems that 3.8 is a leftover from the 1st edition.
    The full listing of layout.pug (Listing 4.5) doesn't fit to the text and code on page 96.

    For the views to work like shown at the end of section 4.3.2, the text should point out to update the CSS file from GitHub. It is mentioned somewhat later, but it wouldn't hurt adding that remark at this point in the text.