Fixed map controls

master
Keith Irwin 2017-07-11 03:01:56 -04:00
parent d499632d97
commit e233c7f503
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
2 changed files with 18 additions and 3 deletions

19
static/js/controls.js vendored
View File

@ -1,7 +1,24 @@
'use strict';
/* global navigator $ socket userid token mapuser toggleMaps */
/* global navigator $ userid token mapuser toggleMaps */
import css from '../css/controls.css';
import io from 'socket.io-client';
const socket = io('//'+window.location.hostname);
// Show/hide map if location is set/unset
function toggleMaps(loc) {
if (loc.lat===0&&loc.lon===0) {
$('#map').hide();
$('#pano').hide();
$('#notset').show();
}
else {
$('#map').show();
$('#pano').show();
$('#notset').hide();
}
}
$(function(){
var wpid, newloc;

View File

@ -2,8 +2,6 @@
/* global mapuser userid disp noHeader mapKey */
import css from '../css/map.css';
// Webpack imports
import io from 'socket.io-client';
import $ from 'jquery';
import loadGoogleMapsAPI from 'load-google-maps-api';