diff --git a/src/components/map/map2d.js b/src/components/map/map2d.js
index f19cd91..fbf1943 100644
--- a/src/components/map/map2d.js
+++ b/src/components/map/map2d.js
@@ -1,7 +1,7 @@
import React from 'react';
import DeckGL from '@deck.gl/react';
import { MapboxLayer } from '@deck.gl/mapbox';
-import { PostProcessEffect } from '@deck.gl/core';
+import { PostProcessEffect, View, MapView } from '@deck.gl/core';
import { StaticMap } from 'react-map-gl';
import { getNaipUrl } from '../util';
import { NAIPLayer, MODISLayer } from '../mapbox-layers';
@@ -73,36 +73,76 @@ export default class Map extends React.Component {
this._deck = ref && ref.deck;
}}
layers={layers}
- initialViewState={initialViewState}
+ viewState={viewState}
onViewStateChange={this.onViewStateChange}
- controller
+ // controller
+ views={[
+ new MapView({
+ id: 'left-view',
+ width: '50%',
+ controller: true,
+ }),
+ new MapView({
+ id: 'right-view',
+ width: '50%',
+ x: '50%',
+ controller: true,
+ }),
+ ]}
onWebGLInitialized={this._onWebGLInitialized}
glOptions={{ stencil: true }}
// Weird effects with MapboxLayer
// effects={[vibranceEffect]}
>
{gl && (
- {
- // save a reference to the mapboxgl.Map instance
- this._map = ref && ref.getMap();
- }}
- gl={gl}
- onLoad={this._onMapLoad}
- mapStyle={mapStyle}
- mapOptions={{ hash: true }}
- >
-
-
-
+
+ {
+ // save a reference to the mapboxgl.Map instance
+ this._map = ref && ref.getMap();
+ }}
+ gl={gl}
+ onLoad={this._onMapLoad}
+ mapStyle={mapStyle}
+ mapOptions={{ hash: true }}
+ >
+
+
+
+
+ )}
+ {gl && (
+
+ {
+ // save a reference to the mapboxgl.Map instance
+ this._map = ref && ref.getMap();
+ }}
+ gl={gl}
+ onLoad={this._onMapLoad}
+ mapStyle={mapStyle}
+ mapOptions={{ hash: true }}
+ >
+
+
+
+
)}
);