locations = new Array();
counter = 0;
function storeLocations(location, info)
{
locations[counter] = location;
createMarker(location, info);
counter++;
}
var infowindow = new google.maps.InfoWindow({ size: new google.maps.Size(150,50) });
function createMarker(latlng, html)
{ var contentString = html;
var marker = new google.maps.Marker({
position: latlng,
map: map,
zIndex: Math.round(latlng.lat()*-100000)<<5
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.setContent(contentString);
infowindow.open(map,marker);
});
}
function init()
{
var center = new google.maps.LatLng(31.777455,-106.499989);
var options = { zoom: 11, mapTypeId: google.maps.MapTypeId.ROADMAP };
map = new google.maps.Map(document.getElementById('map'), options);
map.setCenter(center);
google.maps.event.addListener(map, 'click', function(){
infoWindow.close();
});
var geocoder = new google.maps.Geocoder();
geocoder.geocode({address : '101 S. El Paso Street, El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, "
"); } } )
geocoder.geocode({address : '10635 Gateway Blvd West, El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, ""); } } )
geocoder.geocode({address : '11033 Gateway Blvd West, El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, ""); } } )
geocoder.geocode({address : '111 W. University, El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, ""); } } )
geocoder.geocode({address : '11400 Chito Samaniego Drive, El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, ""); } } )
geocoder.geocode({address : '11825 Gateway Blvd West, El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, ""); } } )
geocoder.geocode({address : '12211 Gateway Blvd West, El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, ""); } } )
geocoder.geocode({address : '1600 Airway Blvd., El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, ""); } } )
geocoder.geocode({address : '1770 Airway Blvd, El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, ""); } } )
geocoder.geocode({address : '2001 Airway Blvd, El Paso, TX'}, function(results) { if(results != null) { storeLocations(results[0].geometry.location, ""); } } )
}