Hi Tine.
If you're asking whether you can use a single name/value in the XML
request URL then (as Larry has replied) the answer is yes.
You could have a single name/value such as 'coordinates':
/phpsqlsearch_genxml.php?coordinates=37.12,-122.78
PHP's explode() function can turn that single value into an array of
two strings:
if(isset($_GET['coordinates'])){
$my_array=explode(',', $_GET['coordinates']);
$lat=(float) $my_array[0]; // cast the string to a float
$lng=(float) $my_array[1]; // cast the string to a float
} else {
// no coordinates requested
}
See: http://uk.php.net/manual/en/function.explode.php
If however you're asking whether you can use a single database table
column to store lat and lng then the answer is 'in practice' NO.
To store both lat and lng in the same column would require that column
data type to be a text type.
That is possible...
But how would the tutorial's database query use a single string to
determine radius from searched for location?
The answer is it couldn't, it requires two floating point numbers and
not a single string to perform the calculation.
HTH.
Martin.
On Aug 28, 5:14 pm, tinem <[email protected]> wrote:
> http://groups.google.com/group/google-maps-api/browse_thread/thread/9...
>
> Would that be possible to make the code just using one field called
> for instance "coordinates" and then like this 55.68223, 12.58368 which
> is like Denmark show it's coordinates?
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.