ok, i have made previous posts, but since then i have made significant
progress. But i am in desperate need of a final push to get this thing
functioning. In order for anyone to help me, this post will be very
elaborate, and im gonna try to give you all the information that i can
so that there wont be any secondary questioning, gonna try to lay it
out on the table right now...

As stated in my previous posts, we are working with this page...(right
now we are only on this alabama page, when it is working we will
implement the code onto the pages for all the other states.)

http://wesco.jp-clients.com/branch_locate/branch_lists/alabama.php

The code that calls all the branch information goes like this...

<?
$link = mysql_connect ($h, $u, $p) or die ("Could not connect to
database, try again later");
mysql_select_db($d, $link);

$result = mysql_query("SELECT * from `markers_csv` where `state` =
'AL' ORDER BY name asc");
?>

and it is posted with this.....

<h4>WESCO Branches - Alabama, United States of America</h4>
<?
while ($row = mysql_fetch_array($result)){
//store the retrieved info as variables...
$name = $row['name'];
$address = $row['address'];
$phone = $row['phone'];
$fax = $row['fax'];
$company = $row['company'];
$lat = $row['lat'];
$lng = $row['lng'];

echo
"<p class='branches_list'>
<a href='http://wesco.jp-clients.com/branch_locate/index.php?lat=
$lat&lng=$lng&zoom=7&type=h&address=$address'><strong>$name</strong></
a><br/>
<strong>Address:</strong>  $address<br/>
<strong>Branch ID:</strong>  $branch_id<br/>
<strong>Phone:</strong> $phone - <strong>Fax:</strong> $fax<br/>
<strong>Company:</strong> $company
</p>";
}
//close server connection...
mysql_close($link);
?>


NOW.....if you click the link for 'birmingham' for example, you can
see what im trying to do. We want the user to click the title of the
branch, and have that direct them to the API page with ONLY THAT
BRANCH being displayed. As you can see i am about 3/4 of the way
there. I have it reading in the lat and lng from the url, and it jumps
directly to that branch on the map page.

...what im having problems with now, is getting the sidebar and marker
'bubble' to show up with the information in it. So far all Im getting
is the marker and the overall area that the branch is in, but no
sidebar or marker 'popup bubble'. here's my javascript that is making
this all happen so far....

                    var map;
            var geocoder;

    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById('map_wesco'));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(<?php echo $lat; ?>,<?php echo
$lng; ?>), 10);
                map.addOverlay(createMarker(new GLatLng(<?php echo $lat; ?>, 
<?php
echo $lng; ?>), 'address')) ;
      }
    }


       function createMarker(point, text) {
                        var marker = new GMarker(point);
                        GEvent.addListener(marker, "click", function() {
                        marker.openInfoWindowHtml(text);
                });

//     marker.openInfoWindowTabsHtml(text);

          return marker;

        }



NOW...before someone says "well its not creating a sidebar because you
dont have that function in the javascript".....know that i am aware of
that, and its not in there so that you guys can see how its
functioning...WHEN I DO put the CreateSideBar function in there...it
shuts down the whole map. I think this is because the default sidebar
is being created based on what the user SEARCHES for, but here, we
would like that information to be passed through the url perhaps. Can
anybody help me finish this thing up? i've tried everything, I could
use some code assistance.

(note: if your just going to post me links other posts, make sure it
is absolutely 100% relevant to what im trying to do, because im
already super confused as it is.)

HEEEELP!!!

Randy Kettering
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to