I have a small basic script that does a search and brings back markers
it is basically the store locator tutorial
it ha been working fine but i wanted to add some fields to the info window.
http://1537news.com/RealEstateTwo.php
My attempt returns "NULL"
Testing the XML it is producing all the data
http://1537news.com/SearchRE_XML.php?lat=41.785&lng=-87.6132&radius=5
Here is a snippet from where the markers are created
var bounds = new GLatLngBounds();
for (var i = 0; i < markers.length; i++) {
var name = markers[i].getAttribute('name');
var address = markers[i].getAttribute('address');
var bedBath = markers[i].getAttribute('bedBath');
var price = markers[i].getAttribute('price');
var distance = parseFloat(markers[i].getAttribute('distance'));
var point = new
GLatLng(parseFloat(markers[i].getAttribute('lat')),
parseFloat(markers[i].getAttribute('lng')));
var marker = createMarker(point, bedBath, price, name, address);
map.addOverlay(marker);
var sidebarEntry = createSidebarEntry(marker, name, address,
distance);
sidebar.appendChild(sidebarEntry);
bounds.extend(point);
}
map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
});
}
function createMarker(point, bedBath, price, name, address) {
var marker = new GMarker(point);
var html = '<b>' + bedBath + '</b> <br/>' + price + '</b> <br/>'
+ name + '</b> <br/>' + address;
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
Any input would be appreciated
Harry Osoff
Web Dev
1537news
--
You received this message because you are subscribed to the Google Groups "Google
Maps JavaScript API v3" group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.