If this question is inappropriate for this group, then that's fine.
But how do you figure that this is not an API question? I have a
Rails app, but this is not a question about Rails. It's the google
maps api that populates data on a google map with pointers, right?
Yes, I have that list of markets displayed on my page already, using
basic Ruby/Rails code. My problem is getting the google map to
recognize and display the data, which is exactly what the map api is
for, is it not?
This is what I have in my javascript file right now, and it's pretty
google api specific if you ask me:
function initialize() {
var map = new google.maps.Map2(document.getElementById("map"));
map.setCenter(new google.maps.LatLng(40.7371, -73.9903), 13);
map.setUIToDefault();
// http://code.google.com/apis/maps/documentation/events.html
function createMarker(latlng, market) {
var marker = new GMarker(latlng);
var html="<strong>"+market.name+"</strong><br /
>"+market.address;
GEvent.addListener(marker,"click", function() {
map.openInfoWindowHtml(latlng, html);
});
return marker;
}
var bounds = new GLatLngBounds;
for (var i = 0; i < markets.length; i++) {
var latlng=new GLatLng(markets[i].lat,markets[i].lng)
bounds.extend(latlng);
map.addOverlay(createMarker(latlng, markets[i]));
}
}
window.onload=initialize;
window.onunload="GUnload()";
On Sep 29, 11:48 am, Marcelo <[email protected]> wrote:
> On Sep 29, 4:28 pm, Mike <[email protected]> wrote:
>
> > What I really need to
> > do is take it to the next level and dynamically pull in data from my
> > database.
>
> That's not a Maps API question.
> Do you know how to get data from your database to an otherwise empty
> HTML page?
>
> --
> Marcelo -http://maps.forum.nu
> --
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---