I am trying to use google map on the page but facing some trouble. I used this api, and installed it without a problem. I set the controller and route as below.
public function map()
{
$response = \GoogleMaps::load('geocoding')
->setParam(['address' => 'tokyo'])
->get();
return view('welcome', compact('response'));
}
Route::get('/', 'PagesController@map');
and calling the API into view.blade. I used just this:
Do I need to add some script too? Becouse I am getting this error;
{ "error_message" : "This API project is not authorized to use this API.", "results" : [], "status" : "REQUEST_DENIED" }
or this error;
/maps/api/place/add/json?key=AIzaSyDRA160KmwA5Z-7KZn_JfJRdSNkkSiqKRB was not found on this server. That’s all we know.
What is the problem here? I double checked the API key. No problem with that. Already gave permission for my domain address too? What am I missing here?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire