Fixed map controls
parent
d499632d97
commit
e233c7f503
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue