I'm having some trouble getting this to work.
I want to set an onclick event from an anchor tag that will pass the
lat and long from a SQL query back to the maps API and position a
marker there and pan to it.
Basically the same functionality the google maps page does now. You
click a link on the left, the map places the marker, and pans to it's
location.
Every-time I try and pass the onlick back, the MAP API dissapears. :(
Please, oh please, great google community.... help me

The page is here:

http://www.unbridledrecovery,com

You'll have to input a zip and a radius to get the map to display

Here's the code I'm using


  function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(<?php echo $clat; ?>, <?php echo
$clong; ?>), 13);
        var customUI = map.getDefaultUI();
        customUI.controls.smallzoomcontrol3d = true;
        map.setUI(customUI);
                                  }
                          }
<div id="map_canvas" style="width: 399px; height: 299px"></div><br />
while ($rowmark = mysql_fetch_array ($resultmarker))
{
$mark_lat = $rowmark[ 'Latitude' ];
$mark_long = $rowmark[ 'Longitude' ];
echo "<a href='' onClick='map.panTo(marker.getLatLng('$mark_lat,
$mark_long'))'>Map</a>";
}
echo "</td></tr>";
}

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