sg

Çarşamba, Aralık 07, 2005

Using passed object name as a string variable


Hey - a javascript question. I'm naming my markets with database record
ID's. When clicked I'd like to capture the name of the market clicked
in the listener and feed it into a url.

So, if I create a gpoint called "p56", for instance, I'd like to have
an info window pop up with "href=/mysite.php?id=56" (etc). How do I do
this? Is there an overlay.name property?

Here's where it needs to go. I know very little about JS and GMaps
finer points (obviously), so your help would be appreciated.

--Rod.

GEvent.addListener(map, 'click', function(overlay, point) {
if (overlay) {
html = "NEED SOME HELP HERE!";
}

var center = map.getCenterLatLng();
var zoom = map.getZoomLevel();
var bounds = map.getBoundsLatLng();
var width = bounds.maxX - bounds.minX;
var height = bounds.maxY - bounds.minY;
<?php echo $langstr; ?>
document.getElementById("latlong").innerHTML = latLngStr;

});

0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık