aboutsummaryrefslogtreecommitdiffstats
path: root/phonegap/www
diff options
context:
space:
mode:
Diffstat (limited to 'phonegap/www')
-rw-r--r--phonegap/www/around.html10
-rw-r--r--phonegap/www/js/mobile.js21
2 files changed, 9 insertions, 22 deletions
diff --git a/phonegap/www/around.html b/phonegap/www/around.html
index 6c379b898..0200b47ca 100644
--- a/phonegap/www/around.html
+++ b/phonegap/www/around.html
@@ -90,8 +90,8 @@ var fixmystreet = {
'page': 'around',
'area': '',
'all_pins': '',
- 'latitude': urlParams.latitude,
- 'longitude': urlParams.longitude,
+ 'latitude': localStorage.latitude,
+ 'longitude': localStorage.longitude,
'zoom': 2,
'numZoomLevels': 5,
@@ -101,9 +101,9 @@ var fixmystreet = {
}
- $('#fixmystreet\\.latitude').val( urlParams.latitude );
- $('#fixmystreet\\.longitude').val( urlParams.longitude );
- $('#pc').val( urlParams.pc );
+ $('#fixmystreet\\.latitude').val( localStorage.latitude );
+ $('#fixmystreet\\.longitude').val( localStorage.longitude );
+ $('#pc').val( localStorage.pc );
</script>
<div id="map_box">
diff --git a/phonegap/www/js/mobile.js b/phonegap/www/js/mobile.js
index c50403bc5..7300e752c 100644
--- a/phonegap/www/js/mobile.js
+++ b/phonegap/www/js/mobile.js
@@ -1,22 +1,9 @@
-var urlParams = {};
-(function () {
- var e,
- a = /\+/g, // Regex for replacing addition symbol with a space
- r = /([^&=]+)=?([^&]*)/g,
- d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
- q = window.location.search.substring(1);
-
- // do it this way to get round jslint complaints
- for (;;) {
- e = r.exec(q);
- if (!e) { break; }
- urlParams[d(e[1])] = d(e[2]);
- }
-})();
-
function show_around( lat, long ) {
pc = $('#pc').val();
- window.location='around.html?pc=' + pc + '&latitude=' + lat + '&longitude=' + long;
+ localStorage.latitude = lat;
+ localStorage.longitude = long;
+ localStorage.pc = pc;
+ window.location='around.html';
return false;
}