Saturday, April 24, 2010

Re: 'Get Directions on your own map' Problems

Hi, I'm currently working on a Google Map system for my dissertation,
my map system uses a method of retrieving maker details from a MYSQL
map and then displaying those details onto the map itself, I'm having
problems with Mike Williams 'Get Directions on your own map' method @
http://econym.org.uk/gmap/directions.htm, I have the same code that he
is using on my own system and for some reason it will not work, on his
page it says that these could be potential problems:

1. GDirections() doesn't currently support queries in the form
"43.82589,-79.1004(My House)".
It does support the format "My Ho...@43.82589,-79.1004".
2. For legal reasons, walking directions don't work if you omit the
second parameter when you create the GDirections() object. The API
needs somewhere to put the disclaimer.

This is how my map reads the address details from the database:

<?php header("Content-type: text/xml");?>
<markers>
<?php
//connect to db

$link = mysql_connect("*****", "******", "*******") or die("Could not
connect: " . mysql_error());
mysql_selectdb("p1",$link) or die ("Can\'t use dbmapserver : " .
mysql_error());

//run query
$result = mysql_query("select * from markers1");

//loop data
while($data = mysql_fetch_array($result)){
echo ("\t <marker lat=\"$data[latitude]\" lng=
\"$data[longitude]\"
html=\"$data[address]\" label=\"$data[address]\" category=
\"$data[category]\" icontype=\"$data[icon]\"/>");
}

?>

</markers>

I do not understand why mine doesn't work is it something to do with
the order they are retrieved from databases? i'm not sure...any help
would be much appreciated

The website is stored on the university server so i'm not sure if you
can look at it from where your located but here it is -
http://www.computing.northampton.ac.uk/~07479549/project/p1/index.php
it's best to view it in FIREFOX because i'm yet to format it to work
in other browsers

--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate