Sixth pass at adding key files
This commit is contained in:
21
site/googlemaps/gmaps_all.js
Normal file
21
site/googlemaps/gmaps_all.js
Normal file
@ -0,0 +1,21 @@
|
||||
<script type="text/javascript" src="http://www.slowtwitch.com/googlemaps/util.js"></script>
|
||||
<script type="text/javascript">
|
||||
function initializeAllMap(myURL) {
|
||||
//alert("mapping!");
|
||||
var myLatlng = new google.maps.LatLng(40, -100);
|
||||
var myOptions = {
|
||||
zoom: 3,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
}
|
||||
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
|
||||
downloadUrl(myURL, function(data) {
|
||||
var markers = data.documentElement.getElementsByTagName("marker");
|
||||
for (var i = 0; i < markers.length; i++) {
|
||||
var latlng = new google.maps.LatLng(parseFloat(markers[i].getAttribute("lat")),
|
||||
parseFloat(markers[i].getAttribute("lng")));
|
||||
var marker = new google.maps.Marker({position: latlng, map: map, title: markers[i].getAttribute("name")});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
1
site/googlemaps/json/coach.json
Normal file
1
site/googlemaps/json/coach.json
Normal file
File diff suppressed because one or more lines are too long
1
site/googlemaps/json/fitter.json
Normal file
1
site/googlemaps/json/fitter.json
Normal file
File diff suppressed because one or more lines are too long
BIN
site/googlemaps/json/json.zip
Normal file
BIN
site/googlemaps/json/json.zip
Normal file
Binary file not shown.
1
site/googlemaps/json/race.json
Normal file
1
site/googlemaps/json/race.json
Normal file
File diff suppressed because one or more lines are too long
1
site/googlemaps/json/retailer.json
Normal file
1
site/googlemaps/json/retailer.json
Normal file
File diff suppressed because one or more lines are too long
1
site/googlemaps/json/roadshow.json
Normal file
1
site/googlemaps/json/roadshow.json
Normal file
@ -0,0 +1 @@
|
||||
[{"category":"roadshow","name":"Bonzai Sports","lat":38.904300689697,"lng":-77.266296386719,"info1":"204-D Mill Street","info2":"","info3":"Vienna","info4":"Virginia","phone":"(703) 281-2104","email":"sales@tribonzai.com","website":"http:\/\/tribonzai.com","details":"\/roadshow\/individual.php?roadshow_id=45"}]
|
1
site/googlemaps/json/runshop.json
Normal file
1
site/googlemaps/json/runshop.json
Normal file
File diff suppressed because one or more lines are too long
1
site/googlemaps/json/triclub.json
Normal file
1
site/googlemaps/json/triclub.json
Normal file
File diff suppressed because one or more lines are too long
84
site/googlemaps/util.js
Normal file
84
site/googlemaps/util.js
Normal file
@ -0,0 +1,84 @@
|
||||
/**
|
||||
* 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 {
|
||||
if (typeof ActiveXObject != 'undefined') {
|
||||
return new ActiveXObject('Microsoft.XMLHTTP');
|
||||
} else if (window["XMLHttpRequest"]) {
|
||||
return new XMLHttpRequest();
|
||||
}
|
||||
} 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);
|
||||
}
|
Reference in New Issue
Block a user