PHP Classes

Get current location Lat Long

Recommend this page to a friend!

      Map Builder  >  All threads  >  Get current location Lat Long  >  (Un) Subscribe thread alerts  
Subject:Get current location Lat Long
Summary:$map->addGeoMarker and stuff
Messages:14
Author:Samuel Bistak
Date:2015-12-18 17:54:22
 
  1 - 10   11 - 14  

  11. Re: Get current location Lat Long   Reply   Report abuse  
Picture of Samuel Bistak Samuel Bistak - 2015-12-19 19:46:59 - In reply to message 10 from Samuel Bistak
Is sending me status code 500 on requset....

  12. Re: Get current location Lat Long   Reply   Report abuse  
Picture of Vagharshak Tozalakyan Vagharshak Tozalakyan - 2015-12-19 19:51:24 - In reply to message 10 from Samuel Bistak
Your var_dump() call will output to AJAX response. You can see the output in Firebug or Chrome console.

Also you can get the response in JS:

$.post("map.php", {lat: lat, lng: lng}, function(response) {
alert(response);
}, "text");

  13. Re: Get current location Lat Long   Reply   Report abuse  
Picture of Samuel Bistak Samuel Bistak - 2015-12-19 19:53:48 - In reply to message 12 from Vagharshak Tozalakyan
Ok but i need those coordinate ($lat , $lng) for selecting from my database via PHP. I need to put them in MySql query so alert(); will not help me....

  14. Re: Get current location Lat Long   Reply   Report abuse  
Picture of Vagharshak Tozalakyan Vagharshak Tozalakyan - 2015-12-19 20:55:39 - In reply to message 13 from Samuel Bistak
You can use $lat and $lng in your PHP code as you like.
However all output (echo, print, var_dump, etc.) will go to AJAX response.

 
  1 - 10   11 - 14