{"id":2785,"date":"2017-09-20T18:27:23","date_gmt":"2017-09-20T18:27:23","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=2785"},"modified":"2021-01-07T09:02:03","modified_gmt":"2021-01-07T09:02:03","slug":"get-geolocation-latitude-longitude-from-image-php","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/","title":{"rendered":"How to Get Latitude and Longitude from Image in PHP"},"content":{"rendered":"<p>Geographical location can be tagged with the photograph by geotagging. Generally, the latitude and longitude are assigned to the geotagged images. Geotagging is done in two ways, automatic or manual. If geolocation is enabled, the geotagging is automatically done by the device. Alternatively, you can tag geodata to the photo manually.<\/p>\n<p>If geolocation is tagged with a photo, the GPS data can be retrieved from it in the future. There is an easy way to <b>get Geotag data from the image using PHP<\/b>. You can get the location where the picture was taken using PHP. In this tutorial, we will show you how to retrieve geolocation information from the image in PHP. <\/p>\n<p>In this example script, we will retrieve the GPS data (latitude and longitude) from the image in PHP. This latitude and longitude can be used to show the location of the image on Google map.<\/p>\n<h2>Get Latitude and Longitude from Image<\/h2>\n<p>The <b>exif_read_data()<\/b> function in PHP, helps to read the EXIF headers from an image file. We will use exif_read_data() function to get the GPS data from image. For better usability, we&#8217;ll group all code together in a custom PHP function called <b>get_image_location()<\/b>.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>The get_image_location() function returns latitude and longitude from the image file in an array format.<\/li>\n<\/ul>\n<pre><span style=\"color: #FF8000\">\/**<br \/>&nbsp;*&nbsp;get_image_location<br \/>&nbsp;*&nbsp;Returns&nbsp;an&nbsp;array&nbsp;of&nbsp;latitude&nbsp;and&nbsp;longitude&nbsp;from&nbsp;the&nbsp;Image&nbsp;file<br \/>&nbsp;*&nbsp;@param&nbsp;$image&nbsp;file&nbsp;path<br \/>&nbsp;*&nbsp;@return&nbsp;multitype:array|boolean<br \/>&nbsp;*\/<br \/><\/span><span style=\"color: #007700\">function&nbsp;<\/span><span style=\"color: #0000BB\">get_image_location<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$image&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">''<\/span><span style=\"color: #007700\">){<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$exif&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">exif_read_data<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$image<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">true<\/span><span style=\"color: #007700\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">$exif&nbsp;<\/span><span style=\"color: #007700\">&amp;&amp;&nbsp;isset(<\/span><span style=\"color: #0000BB\">$exif<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'GPS'<\/span><span style=\"color: #007700\">])){<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$GPSLatitudeRef&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$exif<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'GPS'<\/span><span style=\"color: #007700\">][<\/span><span style=\"color: #DD0000\">'GPSLatitudeRef'<\/span><span style=\"color: #007700\">];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$GPSLatitude&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$exif<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'GPS'<\/span><span style=\"color: #007700\">][<\/span><span style=\"color: #DD0000\">'GPSLatitude'<\/span><span style=\"color: #007700\">];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$GPSLongitudeRef<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$exif<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'GPS'<\/span><span style=\"color: #007700\">][<\/span><span style=\"color: #DD0000\">'GPSLongitudeRef'<\/span><span style=\"color: #007700\">];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$GPSLongitude&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$exif<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'GPS'<\/span><span style=\"color: #007700\">][<\/span><span style=\"color: #DD0000\">'GPSLongitude'<\/span><span style=\"color: #007700\">];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$lat_degrees&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLatitude<\/span><span style=\"color: #007700\">)&nbsp;&gt;&nbsp;<\/span><span style=\"color: #0000BB\">0&nbsp;<\/span><span style=\"color: #007700\">?&nbsp;<\/span><span style=\"color: #0000BB\">gps2Num<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLatitude<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">])&nbsp;:&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$lat_minutes&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLatitude<\/span><span style=\"color: #007700\">)&nbsp;&gt;&nbsp;<\/span><span style=\"color: #0000BB\">1&nbsp;<\/span><span style=\"color: #007700\">?&nbsp;<\/span><span style=\"color: #0000BB\">gps2Num<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLatitude<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">1<\/span><span style=\"color: #007700\">])&nbsp;:&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$lat_seconds&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLatitude<\/span><span style=\"color: #007700\">)&nbsp;&gt;&nbsp;<\/span><span style=\"color: #0000BB\">2&nbsp;<\/span><span style=\"color: #007700\">?&nbsp;<\/span><span style=\"color: #0000BB\">gps2Num<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLatitude<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">2<\/span><span style=\"color: #007700\">])&nbsp;:&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$lon_degrees&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLongitude<\/span><span style=\"color: #007700\">)&nbsp;&gt;&nbsp;<\/span><span style=\"color: #0000BB\">0&nbsp;<\/span><span style=\"color: #007700\">?&nbsp;<\/span><span style=\"color: #0000BB\">gps2Num<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLongitude<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">])&nbsp;:&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$lon_minutes&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLongitude<\/span><span style=\"color: #007700\">)&nbsp;&gt;&nbsp;<\/span><span style=\"color: #0000BB\">1&nbsp;<\/span><span style=\"color: #007700\">?&nbsp;<\/span><span style=\"color: #0000BB\">gps2Num<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLongitude<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">1<\/span><span style=\"color: #007700\">])&nbsp;:&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$lon_seconds&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLongitude<\/span><span style=\"color: #007700\">)&nbsp;&gt;&nbsp;<\/span><span style=\"color: #0000BB\">2&nbsp;<\/span><span style=\"color: #007700\">?&nbsp;<\/span><span style=\"color: #0000BB\">gps2Num<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$GPSLongitude<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">2<\/span><span style=\"color: #007700\">])&nbsp;:&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$lat_direction&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;(<\/span><span style=\"color: #0000BB\">$GPSLatitudeRef&nbsp;<\/span><span style=\"color: #007700\">==&nbsp;<\/span><span style=\"color: #DD0000\">'W'&nbsp;<\/span><span style=\"color: #007700\">or&nbsp;<\/span><span style=\"color: #0000BB\">$GPSLatitudeRef&nbsp;<\/span><span style=\"color: #007700\">==&nbsp;<\/span><span style=\"color: #DD0000\">'S'<\/span><span style=\"color: #007700\">)&nbsp;?&nbsp;-<\/span><span style=\"color: #0000BB\">1&nbsp;<\/span><span style=\"color: #007700\">:&nbsp;<\/span><span style=\"color: #0000BB\">1<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$lon_direction&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;(<\/span><span style=\"color: #0000BB\">$GPSLongitudeRef&nbsp;<\/span><span style=\"color: #007700\">==&nbsp;<\/span><span style=\"color: #DD0000\">'W'&nbsp;<\/span><span style=\"color: #007700\">or&nbsp;<\/span><span style=\"color: #0000BB\">$GPSLongitudeRef&nbsp;<\/span><span style=\"color: #007700\">==&nbsp;<\/span><span style=\"color: #DD0000\">'S'<\/span><span style=\"color: #007700\">)&nbsp;?&nbsp;-<\/span><span style=\"color: #0000BB\">1&nbsp;<\/span><span style=\"color: #007700\">:&nbsp;<\/span><span style=\"color: #0000BB\">1<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$latitude&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$lat_direction&nbsp;<\/span><span style=\"color: #007700\">*&nbsp;(<\/span><span style=\"color: #0000BB\">$lat_degrees&nbsp;<\/span><span style=\"color: #007700\">+&nbsp;(<\/span><span style=\"color: #0000BB\">$lat_minutes&nbsp;<\/span><span style=\"color: #007700\">\/&nbsp;<\/span><span style=\"color: #0000BB\">60<\/span><span style=\"color: #007700\">)&nbsp;+&nbsp;(<\/span><span style=\"color: #0000BB\">$lat_seconds&nbsp;<\/span><span style=\"color: #007700\">\/&nbsp;(<\/span><span style=\"color: #0000BB\">60<\/span><span style=\"color: #007700\">*<\/span><span style=\"color: #0000BB\">60<\/span><span style=\"color: #007700\">)));<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$longitude&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$lon_direction&nbsp;<\/span><span style=\"color: #007700\">*&nbsp;(<\/span><span style=\"color: #0000BB\">$lon_degrees&nbsp;<\/span><span style=\"color: #007700\">+&nbsp;(<\/span><span style=\"color: #0000BB\">$lon_minutes&nbsp;<\/span><span style=\"color: #007700\">\/&nbsp;<\/span><span style=\"color: #0000BB\">60<\/span><span style=\"color: #007700\">)&nbsp;+&nbsp;(<\/span><span style=\"color: #0000BB\">$lon_seconds&nbsp;<\/span><span style=\"color: #007700\">\/&nbsp;(<\/span><span style=\"color: #0000BB\">60<\/span><span style=\"color: #007700\">*<\/span><span style=\"color: #0000BB\">60<\/span><span style=\"color: #007700\">)));<br \/><br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;array(<\/span><span style=\"color: #DD0000\">'latitude'<\/span><span style=\"color: #007700\">=&gt;<\/span><span style=\"color: #0000BB\">$latitude<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #DD0000\">'longitude'<\/span><span style=\"color: #007700\">=&gt;<\/span><span style=\"color: #0000BB\">$longitude<\/span><span style=\"color: #007700\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}else{<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;<\/span><span style=\"color: #0000BB\">false<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;}<br \/>}<\/span><\/pre>\n<p>The <code>gps2Num()<\/code> is a helper function, used in <code>get_image_location()<\/code> function to convert GPS coord part in float val.<\/p>\n<pre><span style=\"color: #007700\">function&nbsp;<\/span><span style=\"color: #0000BB\">gps2Num<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$coordPart<\/span><span style=\"color: #007700\">){<br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$parts&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">explode<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'\/'<\/span><span style=\"color: #007700\">,&nbsp;<\/span><span style=\"color: #0000BB\">$coordPart<\/span><span style=\"color: #007700\">);<br \/>&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$parts<\/span><span style=\"color: #007700\">)&nbsp;&lt;=&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;if(<\/span><span style=\"color: #0000BB\">count<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$parts<\/span><span style=\"color: #007700\">)&nbsp;==&nbsp;<\/span><span style=\"color: #0000BB\">1<\/span><span style=\"color: #007700\">)<br \/>&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;<\/span><span style=\"color: #0000BB\">$parts<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">];<br \/>&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;<\/span><span style=\"color: #0000BB\">floatval<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$parts<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">0<\/span><span style=\"color: #007700\">])&nbsp;\/&nbsp;<\/span><span style=\"color: #0000BB\">floatval<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$parts<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #0000BB\">1<\/span><span style=\"color: #007700\">]);<br \/>}<\/span><\/pre>\n<p><b>Usage:<\/b><br \/>\nPass an image file path in <code>get_image_location()<\/code> function to get the latitude and longitude from the image.<\/p>\n<pre><span style=\"color: #FF8000\">\/\/image&nbsp;file&nbsp;path<br \/><\/span><span style=\"color: #0000BB\">$imageURL&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">\"images\/geotagged-image.jpeg\"<\/span><span style=\"color: #007700\">;<br \/><br \/><\/span><span style=\"color: #FF8000\">\/\/get&nbsp;location&nbsp;of&nbsp;image<br \/><\/span><span style=\"color: #0000BB\">$imgLocation&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">get_image_location<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$imageURL<\/span><span style=\"color: #007700\">);<br \/><br \/><\/span><span style=\"color: #FF8000\">\/\/latitude&nbsp;&amp;&nbsp;longitude<br \/><\/span><span style=\"color: #0000BB\">$imgLat&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$imgLocation<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'latitude'<\/span><span style=\"color: #007700\">];<br \/><\/span><span style=\"color: #0000BB\">$imgLng&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">$imgLocation<\/span><span style=\"color: #007700\">[<\/span><span style=\"color: #DD0000\">'longitude'<\/span><span style=\"color: #007700\">];<\/span><\/pre>\n<h2>Display Location on Google Map where Picture was Taken<\/h2>\n<p>If you want to show the image geolocation on Google Map, it can be done easily by Google Maps JavaScript API. Use the following code to mark photo <a href=\"https:\/\/www.codexworld.com\/adding-google-map-on-website-within-5-minutes\/\">location on Map using Google Maps JavaScript API<\/a>.<\/p>\n<p><b>Google Maps JavaScript API:<\/b><br \/>\nAt first, you need to include the Google Maps JavaScript API and specify API Key in the key parameter.<\/p>\n<pre>&lt;<span style=\"color:#bf4f24\">script<\/span> <span style=\"color:#bf4f24\">src<\/span>=<span style=\"color:#0b6125\">\"https:\/\/maps.googleapis.com\/maps\/api\/js?key=<span style=\"border:2px solid #FB4314; font-weight:bold; border-style:dashed;\">Your_API_KEY<\/span>\"<\/span>&gt;&lt;\/<span style=\"color:#bf4f24\">script<\/span>&gt;\r\n<\/pre>\n<p>Don&#8217;t have an API key, see this step-by-step guide to get your own API key &#8211; <a href=\"https:\/\/www.codexworld.com\/get-google-maps-javascript-api-key\/\">How to Get Google Maps JavaScript API Key<\/a><\/p>\n<p><b>JavaScript Code:<\/b><br \/>\nSpecify the latitude and longitude from the GPS data of the image file.<\/p>\n<pre>&lt;<span style=\"color:#bf4f24\">script<\/span>>\r\n<span style=\"color:#a71d5d;font-style:italic\">var<\/span> myCenter <span style=\"color:#794938\">=<\/span> <span style=\"color:#794938\">new<\/span> <span style=\"color:#bf4f24\">google.maps<\/span>.LatLng(<span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">$imgLat<\/span><span style=\"color: #007700\">;&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>, <span style=\"color: #0000BB\">&lt;?php&nbsp;<\/span><span style=\"color: #007700\">echo&nbsp;<\/span><span style=\"color: #0000BB\">$imgLng<\/span><span style=\"color: #007700\">;&nbsp;<\/span><span style=\"color: #0000BB\">?&gt;<\/span>);\r\n<span style=\"color:#a71d5d;font-style:italic\">function<\/span> <span style=\"color:#bf4f24\">initialize<\/span>(){\r\n    <span style=\"color:#a71d5d;font-style:italic\">var<\/span> mapProp <span style=\"color:#794938\">=<\/span> {\r\n        center:myCenter,\r\n        zoom:<span style=\"color:#811f24;font-weight:700\">10<\/span>,\r\n        mapTypeId:google.maps.MapTypeId.ROADMAP\r\n    };\r\n\r\n    <span style=\"color:#a71d5d;font-style:italic\">var<\/span> map <span style=\"color:#794938\">=<\/span> <span style=\"color:#794938\">new<\/span> <span style=\"color:#bf4f24\">google.maps<\/span>.Map(<span style=\"color:#691c97\">document<\/span>.<span style=\"color:#693a17\">getElementById<\/span>(<span style=\"color:#0b6125\">\"map\"<\/span>),mapProp);\r\n\r\n    <span style=\"color:#a71d5d;font-style:italic\">var<\/span> marker <span style=\"color:#794938\">=<\/span> <span style=\"color:#794938\">new<\/span> <span style=\"color:#bf4f24\">google.maps<\/span>.Marker({\r\n        position:myCenter,\r\n        animation:google.maps.Animation.BOUNCE\r\n    });\r\n\r\n    marker.setMap(map);\r\n}\r\ngoogle.maps.<span style=\"color:#691c97\">event<\/span>.addDomListener(<span style=\"color:#691c97\">window<\/span>, <span style=\"color:#0b6125\">'load'<\/span>, initialize);\r\n&lt;\/<span style=\"color:#bf4f24\">script<\/span>>\r\n<\/pre>\n<p><b>HTML Code:<\/b><br \/>\nDefine an area to display Google Map.<\/p>\n<pre>&lt;<span style=\"color:#bf4f24\">div<\/span> <span style=\"color:#bf4f24\">id<\/span><span style=\"color:#794938\">=<\/span><span style=\"color:#0b6125\">\"map\"<\/span>>&lt;\/<span style=\"color:#bf4f24\">div<\/span>>\r\n<\/pre>\n<p><b>CSS Code<\/b><br \/>\nUse CSS to set the size of the map div.<\/p>\n<pre><span style=\"color:#bf4f24\">#map<\/span>{\r\n    <span style=\"color:#691c97\">width<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">100<span style=\"color:#794938\">%<\/span><\/span>;\r\n    <span style=\"color:#691c97\">height<\/span><span style=\"color:#794938\">:<\/span> <span style=\"color:#811f24;font-weight:700\">400<span style=\"color:#794938\">px<\/span><\/span>;\r\n}\r\n<\/pre>\n<h2>Conclusion<\/h2>\n<p>This example script is very helpful to get geolocation from photo and mark on Google Map. You can retrieve the picture taken location from the image dynamically using PHP. The user can find the geolocation of the image easily with PHP.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Geographical location can be tagged with the photograph by geotagging. Generally, the latitude and longitude are assigned to the geotagged images. Geotagging is done in two ways, automatic or manual. If geolocation is enabled, the <\/p>\n","protected":false},"author":1,"featured_media":2787,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[343,15,35,344,155,156,14],"class_list":["post-2785","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-geolocation","tag-google-maps","tag-google-maps-api","tag-gps","tag-latitude","tag-longitude","tag-php","cat-4-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Get Latitude and Longitude from Image in PHP - CodexWorld<\/title>\n<meta name=\"description\" content=\"Find geolocation where picture was taken using PHP. Example script to get latitude and longitude from image in PHP and mark geolocation on Google Map using Google Maps JavaScript API.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Get Latitude and Longitude from Image in PHP - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"Find geolocation where picture was taken using PHP. Example script to get latitude and longitude from image in PHP and mark geolocation on Google Map using Google Maps JavaScript API.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2017-09-20T18:27:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-07T09:02:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/09\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1366\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"How to Get Latitude and Longitude from Image in PHP\",\"datePublished\":\"2017-09-20T18:27:23+00:00\",\"dateModified\":\"2021-01-07T09:02:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/\"},\"wordCount\":433,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png\",\"keywords\":[\"Geolocation\",\"Google Maps\",\"Google Maps API\",\"GPS\",\"Latitude\",\"Longitude\",\"PHP\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/\",\"name\":\"How to Get Latitude and Longitude from Image in PHP - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png\",\"datePublished\":\"2017-09-20T18:27:23+00:00\",\"dateModified\":\"2021-01-07T09:02:03+00:00\",\"description\":\"Find geolocation where picture was taken using PHP. Example script to get latitude and longitude from image in PHP and mark geolocation on Google Map using Google Maps JavaScript API.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png\",\"width\":1366,\"height\":768,\"caption\":\"get-latitude-longitude-from-image-php-google-map-api-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-geolocation-latitude-longitude-from-image-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Get Latitude and Longitude from Image in PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Get Latitude and Longitude from Image in PHP - CodexWorld","description":"Find geolocation where picture was taken using PHP. Example script to get latitude and longitude from image in PHP and mark geolocation on Google Map using Google Maps JavaScript API.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/","og_locale":"en_US","og_type":"article","og_title":"How to Get Latitude and Longitude from Image in PHP - CodexWorld","og_description":"Find geolocation where picture was taken using PHP. Example script to get latitude and longitude from image in PHP and mark geolocation on Google Map using Google Maps JavaScript API.","og_url":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2017-09-20T18:27:23+00:00","article_modified_time":"2021-01-07T09:02:03+00:00","og_image":[{"width":1366,"height":768,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/09\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"How to Get Latitude and Longitude from Image in PHP","datePublished":"2017-09-20T18:27:23+00:00","dateModified":"2021-01-07T09:02:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/"},"wordCount":433,"commentCount":0,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/09\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png","keywords":["Geolocation","Google Maps","Google Maps API","GPS","Latitude","Longitude","PHP"],"articleSection":["PHP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/","url":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/","name":"How to Get Latitude and Longitude from Image in PHP - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/09\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png","datePublished":"2017-09-20T18:27:23+00:00","dateModified":"2021-01-07T09:02:03+00:00","description":"Find geolocation where picture was taken using PHP. Example script to get latitude and longitude from image in PHP and mark geolocation on Google Map using Google Maps JavaScript API.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/09\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/09\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png","width":1366,"height":768,"caption":"get-latitude-longitude-from-image-php-google-map-api-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/get-geolocation-latitude-longitude-from-image-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"How to Get Latitude and Longitude from Image in PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/09\/get-latitude-longitude-from-image-php-google-map-api-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-IV","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=2785"}],"version-history":[{"count":3,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2785\/revisions"}],"predecessor-version":[{"id":4549,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2785\/revisions\/4549"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/2787"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=2785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=2785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=2785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}