Search code examples
salesforcesalesforce-lightninglwc

Lightning Web Component Specialist Super badge: Challenge 7


I am having trouble solving the Challenge 7 I have the required imports as well as required functions in the JS file. Still #Trailhead giving error:

We can’t find the getLocationFromBrowser() function in the component boatsNearMe controller. Make sure the component was created according to the requirements, including the use of 'getCurrentPosition()' to get the navigator’s geolocation, the arrow notation with 'position =>', getting the coordinates from the position, and assigning them to the controller’s properties 'latitude' and 'longitude, using the proper case sensitivity.

Error

---- Removed the CODE Section in order to stay with Trailhead's Policy ----

I guess this is something which i am missing out in the code.


Solution

  • Your references to the Geolocation Latititude and Longitudes are missing an "_"

    You have them like this (single underscores);

    rowBoat.Geolocation_Latitude_s

    And this need to be like this (double underscores);

    rowBoat.Geolocation__Latitude__s

    I haven't gone through all the code, but at least these look wrong in your code. Also, not sure that the @track is explicitly needed in this case (anymore).