Skip to content

Commit

Permalink
feat: map style
Browse files Browse the repository at this point in the history
  • Loading branch information
turban committed Nov 26, 2019
1 parent 4626b79 commit 519f867
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/Map.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.dhis2-map-split-view .mapboxgl-ctrl-group {
position: absolute;
top: 10px;
right: 10px;
}
10 changes: 8 additions & 2 deletions src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import Dots from './layers/Dots'
import ClientCluster from './layers/ClientCluster'
import EarthEngine from './layers/EarthEngine'
import { getBoundsFromLayers } from './utils/geometry'
import syncMaps from './utils/sync'
import './Map.css'

const layers = {
tileLayer: TileLayer,
Expand Down Expand Up @@ -149,10 +151,14 @@ export class Map extends Evented {
}

// Synchronize this map with other maps with the same id
sync(id) {}
sync(id) {
syncMaps.add(id, this._mapgl)
}

// Remove synchronize of this map
unsync(id) {}
unsync(id) {
syncMaps.remove(id, this._mapgl)
}

onClick(evt) {
const eventObj = this._createClickEvent(evt)
Expand Down

0 comments on commit 519f867

Please sign in to comment.