Skip to content

Commit

Permalink
chore: remove unused code and imports, and adjust comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mmayeda committed May 1, 2024
1 parent 001e40a commit 9166571
Showing 1 changed file with 2 additions and 43 deletions.
45 changes: 2 additions & 43 deletions src/Map.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* The main model for the treetracker model
* The main model for the treetracker map
*/
import regeneratorRuntime from 'regenerator-runtime'
import axios from 'axios'
import expect from 'expect-runtime'
import log from 'loglevel'
Expand All @@ -25,8 +24,6 @@ import NearestTreeArrows from './NearestTreeArrows'

class MapError extends Error {}

console.log('Greenstand web map core, version:')

export default class Map {
// events
static REGISTERED_EVENTS = {
Expand All @@ -40,7 +37,7 @@ export default class Map {
}

constructor(options) {
// default
// merge constructor parameter options with default map options
const mapOptions = {
...{
L: window.L,
Expand All @@ -62,15 +59,8 @@ export default class Map {
this[key] = mapOptions[key]
})

// memeber/properties/statuses

// requester
this.requester = new Requester()

// events
this.events = new EventEmitter()

// mount element
this._mountDomElement = null

log.warn('map core version:', require('../package.json').version)
Expand Down Expand Up @@ -640,12 +630,6 @@ export default class Map {
return queryUrl
}

// getClusterRadius(zoomLevel){
// //old code
// //var clusterRadius = getQueryStringValue("clusterRadius") || getClusterRadius(queryZoomLevel);
// return Map.getClusterRadius(zoomLevel);
// }

_goNextPoint() {
log.info('go next tree')
const currentPoint = this.layerSelected.payload
Expand Down Expand Up @@ -1423,29 +1407,4 @@ export default class Map {
clearSelection() {
this._unselectMarker()
}

// async rerender() {
// log.info('rerender')
// log.info('reload tile')

// // unslect the current selected point
// this._unselectMarker()

// await this._unloadTileServer()

// // load tile
// if (this.filters.treeid) {
// log.info('treeid mode do not need tile server')
// log.info('load tree by id')
// await this._loadTree(this.filters.treeid)
// this.tileLoadingMonitor && this.tileLoadingMonitor.destroy()
// } else if (this.filters.tree_name) {
// log.info('tree name mode do not need tile server')
// log.info('load tree by name')
// this.tileLoadingMonitor && this.tileLoadingMonitor.destroy()
// await this._loadTree(undefined, this.filters.tree_name)
// } else {
// await this._loadTileServer()
// }
// }
}

0 comments on commit 9166571

Please sign in to comment.