PHP: Get Timezone & Time Difference from Latitude & Longitude using Google Maps Time Zone API

This article shows how you can get TimeZone name and id in PHP from latitude and longitude value by using Google Maps Time Zone API. Note that: You need to put your API Key in the maps api url like this: https://maps.googleapis.com/maps/api/timezone/json?location=$latitude,$longitude&timestamp=$time&key=xxxxxxxxxxxxxxxxxxxxx You can get the API key from here: Get API Key Here is … Read more

Google Maps: Get Latitude/Longitude value on Click and on Mouse Move

This article shows how to get latitude and longitude value when you click or move the mouse over Google Map. In previous article, we had seen how we can Display Google Map with Marker when we have latitude and longitude value. Here, we will be using the same code to display the Google Map and … Read more

Google Maps: Create New Marker on Clicking the Map

This article shows how to create a new marker whenever you click or double click on the Google Map. In previous article, we had seen how we can Display Google Map with Marker when we have latitude and longitude value. Here, we will be using the same code and adding a new functionality of displaying … Read more

Display Google Map with Marker using Latitude & Longitude Coordinates

This article shows how you can generate Google Map and display it in your webpage when you have latitude and longitude coordinates value. We will be using HTML and Javascript to display the Google Map. First of all, you need to get the Google API Key from Google API Console. You need this API key … Read more

PHP: Get Latitude/Longitude using Google Maps API

Here is a quick PHP code to fetch latitude and longitude of any given place using Google Maps API. CURL is used to fetch data from the API URL. $address = "Kathmandu, Nepal"; $url = "http://maps.google.com/maps/api/geocode/json?address=".urlencode($address); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $responseJson = curl_exec($ch); curl_close($ch); $response = json_decode($responseJson); if ($response->status == … Read more

Google AppScript: Get Latitude Longitude & Distance between Places/City

This article shows how to get latitude and longitude of a particular place or city. We read the city/place name from a Google Spreadsheet, then get the latitude and longitude of that place using Google AppScript’s “Maps” class and then save the lat long in the spreadsheet. We will also be reading two places name … Read more