summaryrefslogtreecommitdiff
path: root/modules_v3/googlemap/util.js
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2014-02-24 23:16:53 +0000
committerGreg Roach <fisharebest@gmail.com>2014-02-28 08:32:05 +0000
commit344e0bc10c444441ce5e95a7a7938c66267792b5 (patch)
treeb03106a711adb168d28ad0c886967f6d57bf5370 /modules_v3/googlemap/util.js
parent980905317bf24858b461a8bf231fb7e4997da21a (diff)
downloadwebtrees-344e0bc10c444441ce5e95a7a7938c66267792b5.tar.gz
webtrees-344e0bc10c444441ce5e95a7a7938c66267792b5.tar.bz2
webtrees-344e0bc10c444441ce5e95a7a7938c66267792b5.zip
Remove unused file
Diffstat (limited to 'modules_v3/googlemap/util.js')
-rw-r--r--modules_v3/googlemap/util.js80
1 files changed, 0 insertions, 80 deletions
diff --git a/modules_v3/googlemap/util.js b/modules_v3/googlemap/util.js
deleted file mode 100644
index bf2f3e72d0..0000000000
--- a/modules_v3/googlemap/util.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
-* Returns an XMLHttp instance to use for asynchronous
-* downloading. This method will never throw an exception, but will
-* return NULL if the browser does not support XmlHttp for any reason.
-* @return {XMLHttpRequest|Null}
-*/
-function createXmlHttpRequest() {
- try {
- return createXMLHttp();
- } catch (e) {
- changeStatus(e);
- }
- return null;
-};
-
-/**
-* This functions wraps XMLHttpRequest open/send function.
-* It lets you specify a URL and will call the callback if
-* it gets a status code of 200.
-* @param {String} url The URL to retrieve
-* @param {Function} callback The function to call once retrieved.
-*/
-function downloadUrl(url, callback) {
- var status = -1;
- var request = createXmlHttpRequest();
- if (!request) {
- return false;
- }
-
- request.onreadystatechange = function() {
- if (request.readyState == 4) {
- try {
- status = request.status;
- } catch (e) {
- // Usually indicates request timed out in FF.
- }
- if (status == 200) {
- callback(request.responseXML, request.status);
- request.onreadystatechange = function() {};
- }
- }
- }
- request.open('GET', url, true);
- try {
- request.send(null);
- } catch (e) {
- changeStatus(e);
- }
-};
-
-/**
- * Parses the given XML string and returns the parsed document in a
- * DOM data structure. This function will return an empty DOM node if
- * XML parsing is not supported in this browser.
- * @param {string} str XML string.
- * @return {Element|Document} DOM.
- */
-function xmlParse(str) {
- if (typeof ActiveXObject != 'undefined' && typeof GetObject != 'undefined') {
- var doc = new ActiveXObject('Microsoft.XMLDOM');
- doc.loadXML(str);
- return doc;
- }
-
- if (typeof DOMParser != 'undefined') {
- return (new DOMParser()).parseFromString(str, 'text/xml');
- }
-
- return createElement('div', null);
-}
-
-/**
- * Appends a Javascript file to the page.
- * @param {string} url
- */
-function downloadScript(url) {
- var script = document.createElement('script');
- script.src = url;
- document.body.appendChild(script);
-}