Use @utils instead of jQuery
This commit is contained in:
parent
c343893d00
commit
8c16eb4cd0
6 changed files with 17 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
|||
import $ from 'jquery';
|
||||
import L from 'leaflet';
|
||||
import { getJSON } from '@utils';
|
||||
|
||||
import { getData } from '../shared/data';
|
||||
import { DEFAULT_POSITION } from '../shared/carto';
|
||||
|
@ -11,8 +11,8 @@ import {
|
|||
} from './carto/draw';
|
||||
|
||||
function initialize() {
|
||||
if ($('#map').length > 0) {
|
||||
$.getJSON(getData('carto').getPositionUrl).then(
|
||||
if (document.getElementById('map')) {
|
||||
getJSON(getData('carto').getPositionUrl).then(
|
||||
position => initializeWithPosition(position),
|
||||
() => initializeWithPosition(DEFAULT_POSITION)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue