1

i have google map api i just want get these longitude and latitude my phtml code is

<?php $address=$_GET['location'];//location=Manhattan


$address = str_replace(" ", "+", $address);
$url="https://maps.google.com/maps/api/geocode/json?address=$address&key=".$block->getApiKey();

it will genrate a link i.e https://maps.google.com/maps/api/geocode/json?address=Manhattan&key=AIzaSyBr3mn7y42_iHMTcE_5zEJk_uSGCFXIFGk

i just want this link data into my php variable to pass in longitude and latitude of my script function

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.