Skip to content

Commit

Permalink
Remove ancient geolocation JS library.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Nov 6, 2017
1 parent b811bbb commit b2843ab
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 92 deletions.
1 change: 0 additions & 1 deletion templates/web/base/common_scripts.html
Expand Up @@ -12,7 +12,6 @@
version('/vendor/jquery.validate.min.js'),
version('/vendor/dropzone.min.js'),
version('/js/jquery.multi-select.js'),
version('/vendor/geo.min.js'),
version('/cobrands/fixmystreet/fixmystreet.js'),
);

Expand Down
7 changes: 2 additions & 5 deletions web/cobrands/fixmystreet/fixmystreet.js
Expand Up @@ -217,7 +217,7 @@ fixmystreet.geolocate = {
var spincolor = $('<span>').css("color","white").css("color") === $('#front-main').css("background-color") ? 'white' : 'yellow';
$link.append(' <img src="/cobrands/fixmystreet/images/spinner-' + spincolor + '.gif" alt="" align="bottom">');
}
geo_position_js.getCurrentPosition(function(pos) {
navigator.geolocation.getCurrentPosition(function(pos) {
$link.find('img').remove();
success_callback(pos);
}, function(err) {
Expand Down Expand Up @@ -409,10 +409,7 @@ $.extend(fixmystreet.set_up, {
},

report_geolocation: function() {
if (!geo_position_js.init()) {
return;
}
if ($('.js-geolocate').length) {
if ('geolocation' in navigator && $('.js-geolocate').length) {
var link = $('.js-geolocate').attr('action');
link = '<a href="' + link + '" id="geolocate_link">&hellip; ' + translation_strings.geolocate + '</a>';
if ($('body.frontpage').length) {
Expand Down
2 changes: 1 addition & 1 deletion web/cobrands/fixmystreet/staff.js
Expand Up @@ -313,7 +313,7 @@ $.extend(fixmystreet.set_up, {
});
}

if (geo_position_js.init()) {
if ('geolocation' in navigator) {
fixmystreet.geolocate.setup(function(pos) {
var latlon = new OpenLayers.LonLat(pos.coords.longitude, pos.coords.latitude);
var bng = latlon.clone().transform(
Expand Down
85 changes: 0 additions & 85 deletions web/vendor/geo.min.js

This file was deleted.

0 comments on commit b2843ab

Please sign in to comment.