Editing the wagmap_map_1.js file
Hi - I'm trying to get the custom focus function to work. I think my problem is in editing the wagmap_map_1.js file (in particular line 26 - Dreamweaver tells me I have a syntax error when I remove the } bracket)
Can someone please check the below for me. Line 26 is the 3rd from the bottom...
function WAMapRef(mapObj) {
this.obj = mapObj;
this.directions = false;
this.icons = [];
this.markers = [];
this.addresses = [];
this.points = [];
this.getPointByAddress = getPointByAddressFunc;
this.addressFailed = true;
return this;
}
function WAMapPoint(theMarker, theAddress, theIcon, point, map) {
this.icon = theIcon;
this.marker = theMarker;
this.address = theAddress;
return this;
map.setCenter(point, 13);
}
function getPointByAddressFunc(value,attname) {
if (!attname) attname = "street";
for (var x=0; x < this.addresses.length; x++) {
if (eval("this.addresses[x]."+attname) == value) {
return WAMapPoint(this.markers[x],this.addresses[x],this.icons[x]);
}
return WAMapPoint(this.markers[x],this.addresses[x],this.icons[x], this.points[x], this.obj);
return false;
}