Updating map.php file to use HttpClient

Unfortunately, the function seems to only be used by a piece of code that
can't be reached. Hacked my way to test it.