Display map according to zip entered
With over 600 records in our database, we need it to display according to a small area, not the entire collection. To that end we have a zip code search box that also provides a radius calculation to retrieve the record set. However, we need to center the map on the coordinates of the zip code.
I can get the latitude and longitude values but I need to enter those into the wagmp_map file. Is there an option to do that? I see the following on line 112 but can I center the map to center on the coordinates I pass into this file?
function wagmp_map_1() {
if(GBrowserIsCompatible()) {
if(!document.getElementById('wagmp_map_1')) return false;
var map = new GMap2(document.getElementById('wagmp_map_1'));
wagmp_map_1_obj = new WAMapRef(map);
map.enableContinuousZoom();
map.enableDoubleClickZoom();
map.addControl(new GSmallMapControl());
map.addControl(new GScaleControl());
map.addControl(new GMapTypeControl());
var geocoder = new GClientGeocoder();
var fromAddress = {
enabled: false,
street: '',
city: '',
state: '',
zip: '',
country: '',
full: ''
};