Stuck when grouping entries to get any other parameters like url, id etc
The group filter creates an associative array so the location Twig var in your loops is the array item key, which is a string. 

I think you'll have to get the location object that's related to the entry you're currently working with in the loop in order to access its URL. Maybe try setting the location object to a variable by adding something like {% set locationObj = entriesInLocation[0].location.one() %} right after {% for location, entriesInLocation in allEntriesByLocation %}. Then, you should be able to access the location URL using {{ locationObj.url }}.