|
|
@ -9,16 +9,9 @@ $("body").on("submit", "#wordbox-searchbar", function (e) {
|
|
|
|
dolookup($("#wordbox").val());
|
|
|
|
dolookup($("#wordbox").val());
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
//
|
|
|
|
|
|
|
|
//$("body").on("keypress", "#wordbox", function (e) {
|
|
|
|
|
|
|
|
// if (e.which == 13) {
|
|
|
|
|
|
|
|
// dolookup($(this).val());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// return false;
|
|
|
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function dolookup(words) {
|
|
|
|
function dolookup(words) {
|
|
|
|
//try {
|
|
|
|
try {
|
|
|
|
words = words.trim().toLowerCase().replace(/\s+/g, ' ');
|
|
|
|
words = words.trim().toLowerCase().replace(/\s+/g, ' ');
|
|
|
|
|
|
|
|
|
|
|
|
if (!/^[a-z ]+?$/i.test(words)) {
|
|
|
|
if (!/^[a-z ]+?$/i.test(words)) {
|
|
|
@ -50,7 +43,7 @@ function dolookup(words) {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
map.animateMapIn(coords[0], coords[1], zoomlevel);
|
|
|
|
map.animateMapIn(coords[0], coords[1], zoomlevel);
|
|
|
|
// } catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
// alert(e);
|
|
|
|
app.dialog.alert(e, "Error");
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|