On Sep 10, 11:43 am, GG <[email protected]> wrote:
> I dont do any db work in my Gmaps code.  I generate myself xml and use
> GDownloadUrl.  I attempted what you said a few times, can't get the
> map to load.  Any way you can give me an example using my code as a
> base?

Let's see if I can pull this out of thin air here ...

Right now you have your GDownloadUrl call as part of your load()
function.  Take it out, make it it's own function. For this example
I'm going to call it 'query_locations(point)'.  In that function, you
need to break apart 'point' into the two separate values so you can
pass them to your GDownloadUrl call.  For example:

function query_locations(point) {
  // break lat and lng apart
  var lat = point.lat();
  var lng = point.lng();

  // Feed to GDownloadUrl
  GDownloadUrl(...);

 ...
}

At the bottom of your current load() function, insert a listener for
the "move" trigger:

GEvent.addListener(map, "moveend", function() {
  query_locations(map.getCenter());
});

The harder part is making your map-data.php file return values related
to the lat and lng you just fed to it.  You'll have to sort your xml
data to do that.

Hope this helps.
--~--~---------~--~----~------------~-------~--~----~
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